debugging in RT1052 wait mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

debugging in RT1052 wait mode

Jump to solution
1,525 Views
ffloree
Contributor III

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.

pastedImage_1.png pastedImage_2.png

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!

pastedImage_4.png

0 Kudos
1 Solution
1,438 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi tom fang

   Low power mode will influence the debug.

  Normally,if you want to test the low power, you can download the code to the chip flash, then test the code function directly instead of debugging.

  So, please exit the debug mode, just test it by running in the flash, any issues?

  

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
1,439 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi tom fang

   Low power mode will influence the debug.

  Normally,if you want to test the low power, you can download the code to the chip flash, then test the code function directly instead of debugging.

  So, please exit the debug mode, just test it by running in the flash, any issues?

  

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,437 Views
ffloree
Contributor III

Thanks Kerry, your response gives us some confidence, at least, the similar issues should be not come from my code.

Of cause, no debug mode, no these issues, is it possible to make the SWD/JTAG debugging work correct in system idle mode through setting some registers? For example, add some SWD/JTAG debugging interrupts to GPC(0x400F4000-0x400F4038) wake-up resource, maybe other settings, I don't know. Otherwise, we have to debug by printing out some messages, but it isn't what I expect.

0 Kudos
1,437 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi tom fang 

   I suggest you discard the debugger in the low power mode.

   You can download the code to your board, and printf the information to check more details.

   Or you can debug other code which is not in the low power mode at first, after enter the low power mode, it's better to exit the debugger mode.

Wish it helps you!

If you still have questions about it, please kindly let me know.

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,437 Views
ffloree
Contributor III

Thanks Kerry for your time working on this problem.

0 Kudos
1,437 Views
kerryzhou
NXP TechSupport
NXP TechSupport

You are always welcome!

 If you have any new questions in the future, welcome to create the new question post, we will help you in your new post.

Best Regards,

Kerry

0 Kudos