Dear Team:
Could you help to provide an example of 5744P watchdog function? I have tried for days but never create the reset...
Both Greenhills and S32DS are fine.
Appreciate your support!
Best Regards,
Wang.
Solved! Go to Solution.
Hi,
I have uploaded 2 examples how to trigger reset with SWT on MPC5744P.
Have in mind that on MPC5744P SWT is not directly wired to RGM (reset generation module) as it was on MPC56xx devices.
SWT is wired to FCCU module which is connected to RGM. In FCCU there is default reaction on SWT timeout no reaction.
Follow my examples to see how to configured correctly FCCU in order to get reset from SWT.
Examples:
Example MPC5744P SWT Short reset GHS614
https://community.nxp.com/docs/DOC-332498
Peter
Hi,
I have uploaded 2 examples how to trigger reset with SWT on MPC5744P.
Have in mind that on MPC5744P SWT is not directly wired to RGM (reset generation module) as it was on MPC56xx devices.
SWT is wired to FCCU module which is connected to RGM. In FCCU there is default reaction on SWT timeout no reaction.
Follow my examples to see how to configured correctly FCCU in order to get reset from SWT.
Examples:
Example MPC5744P SWT Short reset GHS614
https://community.nxp.com/docs/DOC-332498
Peter
Do you have this Watchdog Demo using SDK?
Hi,Peter
I used your example,It always stay in this line of code from function FCCU_Init():
while (FCCU.CTRL.B.OPS != 0x3)
It can't enter config mode. I use Trace32 and lauterbach.
Thank you!
Li Jun
Hi,
1. Do not step in debugger while in FCCU config mode. It has internal watchdog which will abort mode change operation and you will never get into any mode than normal.
2. Make sure your faults are all cleared before entering FCCU config mode.
For more details read FCCU chapter in reference manual or my application notes dealing with how to configure FCCU which are on our web site.
Peter
飞思卡尔有几版CPU 本身就有问题,上电自检就会出错,直接导致FCCU进入Fault 模式, 所以你根本配置不了。
你知道5744P这款是这样吗?因为我看很多人的帖子都是这个问题,调用clear faults()也无法清掉。
MPC5744P 这款MCU ,的前几个型号是有问题的, 飞思卡尔不厚道,一直在市场上卖不回收,无法做安全功能。 我不知道你用的是那一版MPC5744P。 但你最好查一下你那一版的勘误表。 如果对应的FCCU 错误过多。还是换最新的MCU吧。 还有就是给你一个招,把MCU的startup -self test 给禁止掉。 就会少报很多错到FCCU。 而且上电自检的不一定稳定,还覆盖率低。
Hi Peter,
I don't step in debugger according to your answer,and I called the function FCCU_clear_faults() at the start of main function,but it return 1 of ret_val that shows it can't cleared all FCCU errors. So it still can't enter config state. I don't know the reason or there are other errors in my codes?The following codes are three functions of FCCU.
Best Regards,
Hi,
As I already explained.
No fault must be latched in FCCU_NCFSn registers in order to successfully execute FCCU state change.
There is no other issue.
Load my example and test it.
http://cache.nxp.com/files/microcontrollers/doc/app_note/AN5284.pdf?fsrch=1&sr=2&pageNum=1
https://community.nxp.com/docs/DOC-103571
Peter
hi Peter:
One question appended.
In the reference manual there are 5 NCFS_CFG registers, so in header file there are NCFS_CFG[0~4] declared accordingly.
And every FCCU channel should be configured with two bits, in other words every NCFS_CFG[x] register should be mapped to 16 channels.
However in your demo code, NCFS_CFG[0].B.NCFSC14 is used to setup SWT reset, where SWT should be channel 14.
So how to link an FCCU channel with its NCFS_CFG bit?
Could you provide some more examples to show this?
Appreciate your help!
Best Regards,
Wang
Hi,
This is quite simple.
Open header file and check how FCCU_NCFS_CFG structure is defined.
You will instantly see that there are 2 bits assigned to each NCFSCxx.
Peter
Hi Peter,
I added the following code to your project's startup file(crt0.ppc), it work well and the result without debug tool is that the mcu is reset periodically.But it can’t reset without the part code.In your project,there is not the part code,so it can't work when I use your demo project directly. I would like to know whether there is any risk if I add the part code.I use ghs and trace32.
_start:
;#SWT0
e_lis r4, 0xFC05
e_or2i r4, 0x0000
e_li r3, 0xC520
e_stw r3, 0x10(r4)
e_li r3, 0xD928
e_stw r3, 0x10(r4)
e_lis r3, 0xFF00
e_or2i r3, 0x010A
e_stw r3, 0(r4)
#if defined(__ghs_asm)
.need exit
Thank you!
Dear Peter:
The example works on my side. Thank you very much!
Best Regards,
Wang