MPC5746C MCAL IVOR1_Handler

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

MPC5746C MCAL IVOR1_Handler

1,925 Views
15359283122
Contributor II

Hi all:

      I use AUTOSAR\MPC574XG_MCAL4_3_RTM_HF3_1_0_0 sample to build my first project on MPC5746C using ghs compiler,then I burn IntegrationFramework.elf to MPC5746C through S32DS using PE,but the code does not run,it stops in the IVOR1_Handler.Why?How can I fix this?The attach is IntegrationFramework.elf.Thanks a lot.

0 Kudos
Reply
9 Replies

1,560 Views
hungnguyenphi
NXP Employee
NXP Employee

Dear 进铭 卢, 

The default configuration of this project is for MPC5748G.

Please set point the TRESOS_WORKSPACE_DIR  in file "C:l\NXP\AUTOSAR\MPC574XG_MCAL4_3_RTM_HF3_1_0_0\MPC574XG_MCAL4_3_RTM_HF3_1_0_0_Sample_Application\eclipse\plugins\IntegrationFramework_TS_T2D35M10I0R0\auxiliary\build\launch.bat" to the configuration of MPC5746C "lighting_MPC574XG_4.3/output" by:
SET TRESOS_WORKSPACE_DIR=C:/NXP/AUTOSAR/MPC574XG_MCAL4_3_RTM_HF3_1_0_0/MPC574XG_MCAL4_3_RTM_HF3_1_0_0_Sample_Application/Tresos/Workspace/lighting_MPC574XG_4.3/output


And then please use command "launch.bat TOOLCHAIN=diab MODE=SUPR CORE=0 DERIV=5746C" to build this project. 

Best regards,

Hung.

0 Kudos
Reply

1,560 Views
15359283122
Contributor II

Hi Hung Nguyen Phi,

      I used the command "launch.bat TOOLCHAIN=ghs MODE=SUPR CORE=0 DERIV=5746C",because I just have ghs.And I used the iSystem IC5000 to debug IntegrationFramework.elf,but I found the code stoped in the "if ( MCU_CURRENT_MODE == ePowerMode)" even I used run commad.Why? I don't understand.

编译.png

CodeStop.png

0 Kudos
Reply

1,560 Views
15359283122
Contributor II

Hi Hung Nguyen Phi,

   I update the ghs(6.16) to ghs(716),then the code runs normal,but it wait the mode transition  all the time,the code debug path is Mcu_DistributePllClock() ->Mcu_Ipw_DistributePllClock();->Mcu_MC_ME_SystemClkUpdate( Mcu_pClockConfig->Mcu_u32SystemClkSource );->Mcu_MC_ME_ApplyMode->"while (((uint32)MC_ME_GS_S_MTRANS_MASK32 == (REG_READ32(MC_ME_GS_ADDR32) & (uint32)MC_ME_GS_S_MTRANS_MASK32)) && (u32Timeout > (uint32)0x0U))".It seems the mode have some error config.Expect your answer.Thanks a lot.wait.png

0 Kudos
Reply

1,560 Views
hungnguyenphi
NXP Employee
NXP Employee

Hi 进铭 卢,

I have built MPC574XG_MCAL4_3_RTM_HF3_1_0_0 sample with ghs version 7.1.4 and I do not meet your issue.

Could you please try my elf file and see if it work.

Best regards,

Hung.

0 Kudos
Reply

1,560 Views
15359283122
Contributor II

Hi Hung Nguyen Phi,

   I have a another question.Where can I find the MPC5746C pins description? I want to config a ADC pin.I can not find it in the datasheet and reference manual.

Best regards

0 Kudos
Reply

1,560 Views
15359283122
Contributor II

I found it on the MPC5746C Reference Manual's attachment.

无标题.png

0 Kudos
Reply

1,560 Views
15359283122
Contributor II

Hi Hung Nguyen Phi,

   I use your IntegrationFramework.elf,but it seems like to wait mode transition.result.png

0 Kudos
Reply

1,560 Views
hungnguyenphi
NXP Employee
NXP Employee

Hi 进铭 卢,

Because this ELF file build with optimize space, so maybe when debug you will see it jump to some unexpected line(because this code have been optimized) but the board still run normally. User can change -Ospace to -O0  and remove "-ignore_debug_references \" in "AUTOSAR\MPC574XG_MCAL4_3_RTM_HF3_1_0_0\MPC574XG_MCAL4_3_RTM_HF3_1_0_0_Sample_Application\eclipse\plugins\IntegrationFramework_TS_T2D35M10I0R0\auxiliary\toolchains\make\ghs\build_cfg.mak" to have none optimize code.

Could you please check the behavior of board when run with this IntegrationFramework.elf:

- Wiring as  Figure 3-2. Buttons and LEDs Configuration  of UM.

- Check behavior of board following Table 4-2. LEDs and Buttons Functionality.

I have checked it and see that it work normally.

I also attach the elf file build with none optimize.

Best regards,

Hung

0 Kudos
Reply

1,560 Views
15359283122
Contributor II

Hi Hung Nguyen Phi,

      It also likes to wait the mode transition.My project has a MCU.xdm,it configs the Run and Stop modes,and it runs normal.I think the difference between them is the mode config.

mode.PNG

Best regards,

0 Kudos
Reply