Reply
Posts: 3
Registered: ‎05-16-2017

Cryotimer period irq issue systick irq debugging

I'm porting some sw sources I develop for STM using Thunderboard sense as starting MCU.
I'm using ble stack, but plan to move to mesh stack.
The SW is using cryotimer as alternative RTC, due to rtc used by the stack.
If I use the debugger with period irq enabled the MCU issue the systick irq continuously. If not debugging and period irq enabled the system is working correctly.

Thanks for your help.
Posts: 241
Registered: ‎07-27-2016

Re: Cryotimer period irq issue systick irq debugging

Hi @Massimo_Liani,

 

I am not sure I completely understand the issue. Are you seeing that you cannot enter EM2 when the debugger is connected? What are you trying to do in your application?

 

Best,

 

Manasa

Posts: 3
Registered: ‎05-16-2017

Re: Cryotimer period irq issue systick irq debugging

Hi Manasa,

 

I'm using CRYOTIMER as a pseudo RTC counter, as the RTC counter is exclusively used by gecko stack.

I'm using the PERIOD irq of CRYOTIMER update internal timer data anche check for overflow.

I'll try to explain better the status of the application:

1. simplicity studio empty application generated based on Thunderboard Sense board BRD4160A

2. CRYOTIMER enabled on ULFRCO

3. PERIOD irq of CRYOTIMER enabled

4. SYSTICK not configured and NVIC SYSTICK irq as default (no additional instruction from my code)

5. I leave all gecko stack initilization and message handling as generated

 

Running without debugger everything is working fine.

Starting the debug, using the Thunderboard Sense board one, the CPU issue continuosily the SysTick IRQ (with a period shorten than 1ms). The debugger report on the stack the top is SysTickHandler (or the first time I tried the DefaultHandler) and as second line (the calling point) an fffffffff impossible to resolve.

The issuing of the SysTick IRQ seem to be immediately after enabling PERIOD IRQ.

 

If using debugger I disable the PERIOD IRQ everything work fine.

 

Now I'm working without PERIOD IRQ enabled to continue my job, but would like to understand if is a limitation using this demo board or could be a criticity.

 

If you need I can pack the project and send to you.

 

Thank you for your help.

Posts: 3
Registered: ‎05-16-2017

Re: Cryotimer period irq issue systick irq debugging

Hi Manasa,

 

Probably I found the solution.

 

Now I init the CRYOTIMER disabled, enable it PERIOD IRQ and set NVIC, then I enable the CRYOTIMER and it work using the DEBUG of SIMPLICITY STUDIO.

 

If I init CRYOTIMER with auto enable option, I enable the PERIOD IRQ I set NVIC priority and when enabling the NVIC IRQ the debugger stop on SysTick IRQ if I step out from SysTick IRQ I go to the end of NVIC_EnableIRQ and if I continue to step it retrigger SysTick and back to EnableIRQ it continue in an infinite loop.

 

This happen only during debugging.

 

I don't know why it happen, not it look to be fixed, but I would like to better understand how it happen.

 

Thank you.