Renesas RH850/U2A: Peripheral suspension

24-Oct-2024

When the OSTM timer and the suspend peripheral feature are enabled, stepping through the code might change the value in the OSTMx.CNT register.

If only one core is observed, the OSTMx.CNT value will change. Conversely, if multiple cores are observed, the OSTMx.CNT value remains unchanged.


Explanation

When the suspend peripheral feature is enabled, the EPC module is configured to stop peripherals when cores are stopped. There are two scenarios to consider:


Only one is observed

One core is stopped, and all other cores are not observed (hence, they are running). Stepping on observed increases the OSTM counter by 2 or 3, which is the number of clock cycles that occur during the step operation.

Since all other cores are running, there is nothing else to keep the OSTM stopped, so it counts the number of clock cycles.


If only one is observed, the OSTMx.CNT value will change:


Any other core is observed

When multiple cores are observed, the OSTM module is stopped even when stepping through the code. Since another core is observed and kept stopped during the single-step operation, the OSTM module is also stopped.

If multiple cores are observed, OSTMx.CNT value won't change.



The observed behavior for both scenarios is considered correct. 


Possible cause

  • The application does not work correctly when stepping through the code because the counters do not stop.
  • For OS applications, the kernel may reset the application because timer values change during stepping and the kernel's watchdog mechanism triggers.


Solution

If it is necessary to keep the OSTM stopped, you should ensure that any other core is observed during debugging. This will prevent the OSTM counter from incrementing and avoid potential application issues.

Go to Hardware | CPU options | Cores | <core> and check Automatically observe this core any other core.


More resources in winIDEA Help

Was this answer helpful?