JM32 / JM60 reset does set SRS bits properly

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

JM32 / JM60 reset does set SRS bits properly

1,422 次查看
davebv
Contributor III

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.

标签 (1)
0 项奖励
回复
1 回复

882 次查看
davebv
Contributor III

Sorry I wrote the title wrong. What I wanted to write was:

 

JM32 / JM60 reset does NOT set SRS bits properly

0 项奖励
回复