MPC560P CodeCode program running away

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

MPC560P CodeCode program running away

Jump to solution
859 Views
xudb
Contributor II

Hi everybody:

    My product is experiencing a problem: My code has a struct,like "typedef struct {

INT32U canid; 

INT8U rxCode;
INT8U IDE; //
INT8U RTR; //
INT8U DLC; // 

INT8U Data[8]; //
//INT8U res; //

}CAN_MSG_T; And I have define a can rx buf and tx buf to recv / trans the data from can int, when THIS struct has "INT8U res" ,the code run OK, but, when NOT, it will RUN AWAY, I dont know why ,does anybody Encounter similar problems?? How CAN I DEBUG IT to fix it? I USED codewarrior is too old to debug any question, I JUST only PRINT LOG TO UART to watch current mcu stat.

 

0 Kudos
Reply
1 Solution
837 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

hard to suggest anything, you need to debug your application and find a place where code goes away.

You can find some example within https://www.nxp.com/docs/en/application-note/AN2865.pdf or e.g. https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-TRK-MPC5604P-Initialization-of-SBC-chip-... 

BR, Petr

View solution in original post

0 Kudos
Reply
2 Replies
838 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

hard to suggest anything, you need to debug your application and find a place where code goes away.

You can find some example within https://www.nxp.com/docs/en/application-note/AN2865.pdf or e.g. https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-TRK-MPC5604P-Initialization-of-SBC-chip-... 

BR, Petr

0 Kudos
Reply
819 Views
xudb
Contributor II

Hi PetrS:

     Thanks for your Help, My problem has been solved, it was caused by the MB headers start address  in the flexray cfg hw struct val, is in internal_ram range which is in lcf file , I change the lcf and the addr, and it dont appear again. Finally ,thanks very much again!

 

0 Kudos
Reply