Can initialization after jumping from bootmanager to application

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Can initialization after jumping from bootmanager to application

424 次查看
Tarek72
Contributor I

I created two software entities: BootManager and Application. The Application uses CAN, and the BootManager jumps to the Application. When running the Application alone, it works correctly, and the clock initializes the CAN. However, when both are running together, the Application enters a fault because the clock doesn't initialize the CAN registers.

While debugging, I found that after jumping to the Application during system initialization, the MTrans register is set to 1. Commenting out this part in the system initialization resolves the issue. Is there a way to deinitialize all peripherals and clocks before jumping to the Application, ensuring the clock is correctly initialized?

0 项奖励
回复
1 回复

407 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Is there a way to deinitialize all peripherals and clocks before jumping to the Application, ensuring the clock is correctly initialized?

Yes, you can do it in ME module. Not sure which device you are asking for, but most MPC has Magic carpet with Mode Entry.

For example:

petervlna_0-1739863961053.png

petervlna_1-1739863979817.png

Basically you will simply halt peripherals which has possibility to do so in their registers.

Then you will set Run Peripheral Configuration Register (MC_ME_RUN_PCn) to freeze clock in target mode.

Do the mode transition to target mode

And you will verify it in status register if the clock is frozen. Peripheral Status Register 0 (MC_ME_PS0)

Best regards,

Peter

 

 

0 项奖励
回复