AnsweredAssumed Answered

debugging in RT1052 wait mode

Question asked by tom fang on Jun 4, 2020
Latest reply on Jun 9, 2020 by Kerry Zhou

Hi,

There is issue of RT1052 debugging, my code including FreeRTOS is running on flash as XIP, but the FreeRTOS tickless idle is enabled, GPT is the tick counter, MCU would go into system idle mode during tickless idle, otherwise, it's in low speed run mode.

 

Without debugging start, the system runs fine without any issue, but if some break points are set in IAR IDE or stopping the code executing by click "Break", sometimes MCU would go out and jump to an address, 0xa05f0000, and most MCU registers are reset to 0xa05f0001. IAR said something wrong about "CSTACK", but it might be a result of something broken first. Do you guys have any experience on this?

I think it's about the wake-up process, if no threads to run, FreeRTOS will call IDLE thread which will ask MCU to go into  "wait" mode by calling WFI, if the "Break" button is clicked at this moment, I assume MCU has to be woken up from "wait" and enter "run" mode, is there any problem here? Any special settings of GPC need? (for example, GPC_EnableIRQ(GPC, xx)). But I still have no idea why setting some break points on IAR would bring in the similar issue as well.

Your any comments are welcome! Thank you!

Outcomes