How to make the MPC5748G continue executing the program after a power reset.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to make the MPC5748G continue executing the program after a power reset.

750 Views
PaddyChan
Contributor III

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:
PaddyChan_0-1683622790310.png

Settings:
PaddyChan_1-1683622954035.png

Console:
PaddyChan_2-1683623156089.png

PaddyChan_3-1683623169136.png

Debugger Console:
PaddyChan_4-1683623209552.png

 

 

 

0 Kudos
6 Replies

728 Views
petervlna
NXP TechSupport
NXP TechSupport

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

0 Kudos

716 Views
PaddyChan
Contributor III

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.

345802140_785944129729564_1429622223455631701_n.jpg

0 Kudos

722 Views
PaddyChan
Contributor III

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

0 Kudos

698 Views
petervlna
NXP TechSupport
NXP TechSupport

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

0 Kudos

650 Views
PaddyChan
Contributor III

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

0 Kudos

636 Views
petervlna
NXP TechSupport
NXP TechSupport

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

0 Kudos