S32K311 can not work normally without debugger

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K311 can not work normally without debugger

ソリューションへジャンプ
3,185件の閲覧回数
Sunj
Contributor II

Dear engineer:

    Firstly, the introduction of the application environment as follow:

    1. we use the IDE of S32 design studio for s32 v3.5;

    2. we use the RTD (version: S32K3XX AUTOSAR 4.4 - R21-11 RTD 3.0.0 D2303 Example Projects);

    3. we create the project through using the choice of S32DS Application Project; 

    4. we use the GDB PEMicro Interface Debugging to load and debug program (Debug_Flash_PNE mode).

    5. we use the self-designed hardware rather than official EVB.

    Then, the problem we faced is:

    We can use the debugger to load and start the program, and the mcu can work well at the mode of debug. However, when we disconnect the mcu with the debugger, and just power on the mcu, the mcu can not work normally. It just run about several seconds then stop. We do not know how to solve this problem. We try to refer some resolution like adding the define of  START_FROM_FLASH in preprossors (as following figure), but it does not work.

Sunj_0-1688608598375.png

   We look forward to any suggestion from anyone, thank you very much!  

 

タグ(1)
0 件の賞賛
返信
1 解決策
3,066件の閲覧回数
Sunj
Contributor II

Dear Daniel:

    Thank you for this valuable advice, we have solved this problem. The main reason which causes this problem should be the incorrect clock configuration. As fore-mentioned introduction, we refer to the demo project of S32K344 to configure the mcu s32k311. In our hardware, we use the 8M external XTAL. Hence,we just adjsut the clock configuration to satisfy the 120MHz core_clk which neglect other clock configuration such as HSE_CLK(which should be half of the core_clk). Therefore, the unsuitable clock casue the mcu abnormal reset (following wave shows the signal of reset_b, several low-level signals lead to the reset of mcu, finally the mcu stops due to the exception).

   Therefore, we reconfigure the each clock source, and the problem is disappeared. We wish the experience can be helpful for others. Thank you again!

Sunj_0-1688969873966.png

Regards,

Sunj.

 

 

元の投稿で解決策を見る

4 返答(返信)
2,527件の閲覧回数
RogerFranca
Contributor II

It worked for me to also, divide the HSE_CLK by 2.

Core CLK = 120 MHz and HSE CLK = 60 MHz

1,095件の閲覧回数
luc-harding-gaussion
Contributor I
This worked for me!
0 件の賞賛
返信
3,156件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Sunj,

After the several seconds, is the MCU reset? Can you monitor the reset_b pin with an oscilloscope?

And if so, what is the source if the reset?

Please read the MC_RGM[FES, DES] registers.

You can use the Power_Ip_GetResetReason() for this.

 

If the MCU is not reset, you should be able to attach the debugger back, halt the execution and find out where the MCU is stuck.

danielmartynek_0-1688910206658.png

 

Regards,

Daniel

 

 

 

0 件の賞賛
返信
3,067件の閲覧回数
Sunj
Contributor II

Dear Daniel:

    Thank you for this valuable advice, we have solved this problem. The main reason which causes this problem should be the incorrect clock configuration. As fore-mentioned introduction, we refer to the demo project of S32K344 to configure the mcu s32k311. In our hardware, we use the 8M external XTAL. Hence,we just adjsut the clock configuration to satisfy the 120MHz core_clk which neglect other clock configuration such as HSE_CLK(which should be half of the core_clk). Therefore, the unsuitable clock casue the mcu abnormal reset (following wave shows the signal of reset_b, several low-level signals lead to the reset of mcu, finally the mcu stops due to the exception).

   Therefore, we reconfigure the each clock source, and the problem is disappeared. We wish the experience can be helpful for others. Thank you again!

Sunj_0-1688969873966.png

Regards,

Sunj.