我想判断5606是否是由于看门狗(SWT)触发复位,尝试读取了不同情况下的RGM_*相关寄存器,各标志位没有明显变化。5606是否支持复位源判断,有相关示例代码可以参考一下吗。
Solved! Go to Solution.
There are two reference manuals:
One covering MPC5605BK and MPC5606BK (you have obviously this one):
https://www.nxp.com/webapp/Download?colCode=MPC5606BRM
And second one is covering MPC5605B, MPC5606B and MPC5607B:
https://www.nxp.com/webapp/Download?colCode=MPC5607BRM
The differences between MPC5606B and MPC5606BK are described in:
https://www.nxp.com/docs/en/application-note/AN4477.pdf
Which part number do you have exactly?
In any case, it is obviously a documentation issue in the version for MPC5606BK. Thanks for pointing this out, I will report it. You can take a look to the second manual where it is described correctly.
By the way, I saw that you mentioned on 8bit number like 0x80 in previous posts. Maybe this is the source of misunderstanding - it's 16bit register.
Regards,
Lukas
Hi,
important point is that RGM_FES and RGM_DES registers are cleared only on Power-On reset. So, to get relevant information, it is necessary to follow this sequence:
- read RGM_DES and RGM_FES after each reset.
- clear all the flags in RGM_DES and RGM_FES by writing '1'. You can simply write the registers like RGM_DES = 0xFFFFFFFF and RGM_FES = 0xFFFFFFFF
- ... and wait for reset...
Then you will get appropriate result after each reset.
Regards,
Lukas
We has try to w1c the status register,but the software reset and SWT reset will trigger same flag been set.
How to distinguish between the two cases way to?
It looks like a reset was triggered before the flag clearing, so two flags are set. I would check this by an oscilloscope if you can see two resets on the reset line.
Regards,
Lukas
This is SWT reset, and register value:
RGM_FES:0x80
RGM_DES:0x00
This is software reset, and register value:
RGM_FES:0x80
RGM_DES:0x00
This doesn't make sense, value 0x80 in RGM_FES means that F_LVD45 flag is set (Flag for 4.5 V low-voltage detected).
Which device do you have exactly? Is that MPC5606S or MPC5606B?
Regards,
Lukas
The MPC5606B device used.
I can see no problem on my side. If I generate SW reset, F_SOFT is set. If watchdog is not disabled, F_SWT is set after reset when it expires.
I would need to see more details what you do exactly.
Regards,
Lukas
We need to be able to distinguish the cause of system reset by reading one or some column flag bits.
Where the F_SOFT and F_SWT description in the 5606 user manual? We try to search the key word, but noting can find.
We just built a simple test logic to trigger software reset or stop watchdog feeding through can message. After entering the program, read the flag bit and clear it.
There are two reference manuals:
One covering MPC5605BK and MPC5606BK (you have obviously this one):
https://www.nxp.com/webapp/Download?colCode=MPC5606BRM
And second one is covering MPC5605B, MPC5606B and MPC5607B:
https://www.nxp.com/webapp/Download?colCode=MPC5607BRM
The differences between MPC5606B and MPC5606BK are described in:
https://www.nxp.com/docs/en/application-note/AN4477.pdf
Which part number do you have exactly?
In any case, it is obviously a documentation issue in the version for MPC5606BK. Thanks for pointing this out, I will report it. You can take a look to the second manual where it is described correctly.
By the way, I saw that you mentioned on 8bit number like 0x80 in previous posts. Maybe this is the source of misunderstanding - it's 16bit register.
Regards,
Lukas
You are right. Our document has issue.This is my manual register description:
Referring to the register definition you provided , we can distinguish the reset source.
Thanks.