David Becerril

JM32 / JM60 reset does set SRS bits properly

Discussion created by David Becerril on Jul 28, 2011
Latest reply on Jul 29, 2011 by David Becerril

Hi everybody,

 

I am working with the JM32 microcontroller and trying to detect what was the reason the micro was reset.

This will help me reset it via software to enter bootloader mode for example.

I try to reset the microcontroller provoking COP and ILOP resets.

 

I have two setups configured so far:

  1. One with the USB off, the cable is not connected to the bus.
  2. One with the USB cable connected and the stack on (so that I can communicate via USB with the PC.

In both situations, with the same code, I cause a COP or ILOP reset, by executing a "while(1);" or  "asm("DCB 0x8D");" respectively.

When I am in the (1) situation, the COP or ILOP bit in SRS register is set, so that I can detect the reset has been caused by the watchdog or ILOP respectively.

However, when I am in the (2) situation, with the USB on, the only bit set in the SRS register is the LVD.

 

Monitoring the power supply voltage there is no drop or low voltage, so I do not understand why in the second case, SRS indicates a Low Voltage caused the reset.

 

Have you found any issue similar to this?

 

Thanks for your help.

Outcomes