I’m running FreeRTOS v10 on an ARM R5 on a Zynq Ultrascale+. I’m having a problem basically restarting FreeRTOS. I can load and start the R5 from the A53. FreeRTOS works perfectly fine the first time I run it. But if I stop it, load/reload memory, and restart the R5, we usually have a problem where time stops advancing in FreeRTOS. I see the same problem when I debug without enabling JTAG boot. When JTAG booting is not enabled, the R5 starts executing FreeRTOS before the debugger connects. The debugger then stops the R5, loads the new image, and restarts it.

Before I follow up in the Zynq specific forums, does anybody have any ideas why a processor reset would cause FreeRTOS to not run correctly? I suspect something, probably the timer, is not setup correctly because it was already initialized once. I’m thinking is might not even be exclusively a FreeRTOS issue.

Can’t remember if the same is true on the R5, but on the Cortex-A cores the startup code needs to be different depending on whether you run the code from reset or run the code from the debugger. The difference being when run from the debugger the system debugger runs a chip initialisation script before starting the application, whereas when running the code from startup an additional function call is required to perform the same initialisation that would otherwise have been done by the debugger.

Other than that - make sure you disable any peripherals and in particular any peripheral interrupts before restarting the application…including the timer used by the tick interrupt.