tickless idle mode: strange behaviour

keepcoding wrote on Tuesday, August 13, 2013:

Hi

The tickless idle mode is a great new feature, BUT I am having serious problems with this option. As soon as I enable the tickless idle mode by setting configUSE_TICKLESS_IDLE to 1 in the config file and flash the program onto the microcontroller, I cannot access it via USB any more. This means, I need to do a reset (‘connect on reset’) and erase the whole chip to be able to reprogram the flash memory via USB. What the heck does this tickless idle mode do to my program?

I am using a STM32F3 Discovery board and the latest FreeRTOS kernel.
any hints are welcome

keepcoding wrote on Tuesday, August 13, 2013:

BTW: with ‘I cannot access it via USB any more’ I mean I’m getting the following error:
“Debugger - Cortex-M Error: Internal Command Error”

rtel wrote on Tuesday, August 13, 2013:

Assuming you are using the default implementation, and not an STM32 customised version, then it will do nothing more than call WFI (the ARM “wait for interrupt” instruction).  I can’t think of any reason why that would prevent you accessing the chip as an interrupt will bring the system out of low power mode.

BTW: with ‘I cannot access it via USB any more’ I mean I’m getting the following error:
“Debugger - Cortex-M Error: Internal Command Error”

From this it looks like you mention of USB is to a debug pod (ST-link, J-link, or such thing) rather than to the chip directly.  Is that the case?  Which debug pod are you using?

Regards.

keepcoding wrote on Tuesday, August 13, 2013:

Thanks for your reply. Yes, I’m using the ST-Link. Do you have an idea what might cause this problem?

rtel wrote on Tuesday, August 13, 2013:

It is not something I have experienced, but I have not tried tickless mode with an ST-Link.

Regards.

imlizking wrote on Sunday, December 29, 2013:

Just googling for Tickless issues and I think I have the answer for this one (a bit late I know):

When the core clock is suspended by the WFI instruction, the debugger won’t be able to access the part, so no single stepping, flash programming, etc. I usually have an #ifdef around the __WFI() so it isn’t included in the Debug build, but is in the Release build.

-sa