Watchdog does not trigger reset on s32k

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

Watchdog does not trigger reset on s32k

ソリューションへジャンプ
962件の閲覧回数
zainali
Contributor II

Hi,

I am trying to setup watchdog for s32k144. For that i am using sdk. The sequence to setup is watchdog is defined below:

  • zainali_1-1652449326022.png
  • WDOG_DRV_Init(INST_WATCHDOG, &watchdog0_Config0); // To initialize the watchodog in main.
  • WDOG_DRV_Trigger(INST_WATCHDOG); // Trigger watchdog in main loop.

 

Now the problem is that if i comment "WDOG_DRV_Trigger(INST_WATCHDOG);" then the MCU does not restart. But if i do run code in debug mode and add breakpoint on "WDOG_DRV_Init" function then watchdog resets MCU.

 

Any idea what might be wrong with my configuration as my watchdog only perform reset when i am in debug mode plus i add breakpoint on "WDOG_DRV_Init".


Thanks

0 件の賞賛
返信
1 解決策
956件の閲覧回数
zainali
Contributor II

The issue was due to optimization level. For above test i was using optimization of -Os. Once i switched to -O0, it would work every time.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
957件の閲覧回数
zainali
Contributor II

The issue was due to optimization level. For above test i was using optimization of -Os. Once i switched to -O0, it would work every time.

0 件の賞賛
返信