I'm using an RA6M3 connected to IAR's EWARM IDE via a J-Link Ultra+. I've read the Low Power Mode section of the RA6M3 user's manual and have looked at the register values and I think I have everything configured correctly. However, when I single-step through my code, it just steps right over the WFI instruction. I would expect the WFI to never return. The debugger would only resume after the device has reset out from the deep software standby state.
Before I pull out more hair, I thought I'd check to see if it is the debugger itself that is preventing the RA6M3 from entering deep software standby.
I've done more research and have a solution. Two, actually.
The script mentioned in the app note cited by Richard can be used. Getting C-Spy (the EWARM debugger) to run the J-Link script involves editing…
Have you looked at the app note:
Getting Started with Low Power Applications Package for RA6M3 and RA4 Groups Application Project (mouser.com)
In summary, yes the debugger ill not allow you to enter SW Standby mode or Deep Software Standby mode.
However, if you use the low power debug script as mentioned in the app note, then yes, you can debug through DP SW Stby mode
I did not find that app note, but I found the script in another posting. From the script, it appears the key is to clear the DBIRQ bit in the MCUCTRL register (section 126.96.36.199 in the RA6M3 User's Manual). MCUCTRL is only accessible via the debugger, so you can't clear this bit in firmware. The debugger needs to do it.
I am using EWARM, not E2. I'm not sure if I can use that script directly or not. I'll have to experiment. EWARM does come with a R7FA_DBG.dmac script that clears this bit in _ExecDeviceCoreConnect(), but it isn't happening. I don't know why. I'm still investigating that.
Has anyone succeeded in debugging the low power modes using EWARM? If so, did you need to do anything special?
please have a look at this Synergy low power example.
I hope this is the correct link
This has the IAR .mac file and how to configure the IAR debug session to allow low power debugging