cancel
Showing results for 
Search instead for 
Did you mean: 

STOP2, STM32L4, DWT issue

Geoffrey1
Associate III

I'm using STOP2 with ChibIOS in an extremely low-power device. ChibiOS uses the DWT counter in a few places to have a predictable delay -- a relatively common "trick". The issue is that when entering STOP2 the debug unit is powered down which, if a sufficiently long time passes, resets DWT.

There is an easy work around -- at the exit from STOP2 reinitialize DWT. I raise this as a documentation issue -- the reference manual should be a lot clearer about what hardware might be corrupted by entering STOP2 so that it would be clearer what needs to be reinitialized on exit. On the whole, the STM32L4 parts have much more benign low-power modes than other STM32 families.

0 REPLIES 0