NRF5340 WFI causes Systick to stop?

I am using FreeRTOS on the NRF5340-DK. When I use WFI (wait for interrupt) in the idle-hook, the processor stop forever (or when we attach a JTAG,

that causes interrupts, so it continues). The Systick is configured to give interrupts, but this process seems to stop. From the ARM documentation, you can configure (in SYST_CST) the source of the Systick clock to Processor/External. Whenever I set the clock source to external (it is changed by (by the hardware?) to Processor. It should be possible to configure just the Systick to generate interrupts to wake up again right?

Parents
  • Hi Bas Van Den Berg, 

    We would need to forward your question to our FreeRTOS expert (who is on vacation this week). In the mean time could you give more information about your setup ? 

    From my understanding you are not using Zephyr and instead using FreeRTOS directly with the nRF53 ? 

    We provide a TICK event that can replace the SYSTick and it can remove the need of the ARM's Systick when the CPU can be powered down, quoted: 

    Using the TICK event, rather than the SysTick, allows the CPU to be powered down while keeping RTOS
    scheduling active.

    I'm not so sure if SysTick can be running when the CPU is powered down with WFI. 

  • Hello,

    I am using FreeRTOS (Latest) on both the App-core and the Net-core. Since FreeRTOS only uses the ARM features (ie Systick) it works on any Cortex-M33. From the FreeRTOS sources, it appears using the systick with WFI is a common occurance, but for me it doesn't work on the NRF53. I could port FreeRTOS to use the TICK instead of SYSTICK, I'll look into that today but it would be great if your FreeRTOS expert could have a look at the current situation as well.

    What would also be interesting is whether Zephyr uses Tick  / Systick to reach the 10 uA consumption..

Reply
  • Hello,

    I am using FreeRTOS (Latest) on both the App-core and the Net-core. Since FreeRTOS only uses the ARM features (ie Systick) it works on any Cortex-M33. From the FreeRTOS sources, it appears using the systick with WFI is a common occurance, but for me it doesn't work on the NRF53. I could port FreeRTOS to use the TICK instead of SYSTICK, I'll look into that today but it would be great if your FreeRTOS expert could have a look at the current situation as well.

    What would also be interesting is whether Zephyr uses Tick  / Systick to reach the 10 uA consumption..

Children
No Data
Related