I have written a program for the MPC5748G using S32DS Power 2.1 SDK. The program runs successfully in debug RAM mode, and I can send and receive CAN messages.
To make the program continue running after a power reset, I have tried using both the debug flash and release methods. However, whenever the power is reset, the program fails to execute properly.
I would like to inquire about methods to make the program continue executing without the need to reprogram it after a power reset.
Best Regards
Paddy
Debug Configurations:
Settings:
Console:
Debugger Console:
Hello,
I will bet that you do not handle SWT (watchdog) and your device will be reset every 20ms.
Could you please specify the issue more closely? Is the SW stuck somewhere? Measure the reset line to see if reset is not triggered by device.
Best regards,
Peter
This is the reset signal I measured.
After the program starts executing, the reset pin remains at 3V.
It can only be brought down to 0V by pressing the external reset button.
Hi,
We have placed the CAN reception, transmission, and related control program within the for loop of the main function, ensuring that it runs continuously.
I would like to inquire whether the MPC5748G can upload and burn programs onto the chip, similar to Arduino, so that it can continue running the previously uploaded program even after the computer is disconnected and the power is reset?
Best Regards
Paddy
Hello,
I would like to inquire whether the MPC5748G can upload and burn programs onto the chip, similar to Arduino, so that it can continue running the previously uploaded program even after the computer is disconnected and the power is reset?
Sure. that is the purpose the the on chip Flash NVM memory.
Would be really bad if you disconnect power from your car, and you will need to reprogram body unit..
If the SW is in flash, then after power on reset it will run independently. What is the outcome of debugging? where does the SW hangs out after power on reset?
What is the content of RGM DES/FES registers?
Any faults latched FCCU NCFSx regiters?
best regards,
Peter
Hi,
The chip we are using is MPC5748G-LCEVB.
I would like to inquire about how to continue executing the previously programmed code after a power reset.
After programming the code into FLASH, is it necessary to press any external buttons to execute the program? Or are we missing something?
This is the link to our program, but it exceeds the website's size limit of 25MB.
https://drive.google.com/drive/folders/1FVbK5CcVXfUwVZC-of4XVGRlQOs5RhsE?usp=sharing
Best Regards
Paddy
Hello,
After programming the code into FLASH, is it necessary to press any external buttons to execute the program? Or are we missing something?
Usually you do power on reset after code loading. to ensure it is running independently of debugger.
I would like to inquire about how to continue executing the previously programmed code after a power reset.
The code will for sure start execution. Use debugger, to see where it hangs out.
You are clearly missing some initialization in your code, but from available information I am not able to tell what.
Best regards,
Peter