Sunday, July 23rd 2017, 10:40pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

en2

Beginner

Date of registration: Feb 6th 2017

Posts: 2

1

Monday, February 6th 2017, 2:57pm

SEGGER_SYSVIEW_RecordEnterISR() crashing program in SysTick ISR

Greetings,

Im facing strange issue with SEGGER_SYSVIEW_RecordEnterISR().

Function works correctly in PendSV_Handler() and also in SVC_Handler() but crashes my software when called in SysTick_Handler() - HardFault when switching to first task context. Any ideas / similar problems? Maybe something with configuration files (priorities etc.)

Im working on STM32F7 and uVision 5 (custom RTOS project) + j-link EDU.

Best,
en2

This post has been edited 1 times, last edit by "en2" (Feb 6th 2017, 3:01pm)


SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 352

2

Monday, February 6th 2017, 6:44pm

Hi,

Does it crash on each call in the SysTick Handler?
Might it be possible that you do not have enough system stack?
As described in the documentation, incoming packets can be handled when creating events,
which may require more stack to be available at any time a SystemView event could be generated.

Regards
Johannes

en2

Beginner

Date of registration: Feb 6th 2017

Posts: 2

3

Tuesday, February 7th 2017, 7:53am

Hello,

Thx for the reply. Unfortunately its crashing only in SysTick Handler (not on the reporting function, but its somehow changing switching procedure and after calling asm BX 0xFFFFFFFD program switches to HardFault Hanlder instead of first task context). My SysTick Handler is calling PendSV interrupt (which has higher priority), and capturing it with RecordEnterISR() cause no error so I assume that its not related with stack (both SysTick and PendSV share MSP while in Handler mode).

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 352

4

Wednesday, February 22nd 2017, 12:01pm

Hi,

This does not seem to be related to SystemView or event recording.
Might it be possible that there is an issue with your RTOS?
Maybe a further analysis in the HardFault Handler might help.
(https://www.segger.com/downloads/appnote…tsOnCortexM.pdf)

Regards
Johannes