KV56 Does not run without debugger connected

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

KV56 Does not run without debugger connected

ソリューションへジャンプ
2,292件の閲覧回数
derekcook
Senior Contributor I

Hello, 

My hardware and software runs when the J-Link debugger is connected with the KV56 MCU, but if I disconnect the debugger via stop in MCUXpresso the code freezes and also if I power the board without the debugger connected the code does not run. 

Why would this be? Is there something I need to do in MCUXpresso to get KV56 to run without debugger connected? 

0 件の賞賛
返信
1 解決策
2,285件の閲覧回数
derekcook
Senior Contributor I

It looks like the debugger unlocks the DWT but you have to do this yourself if not using the debugger. See this post: https://community.nxp.com/t5/Kinetis-Microcontrollers/KV58-DWT-Delay-Problem-DWT%E5%BB%B6%E6%97%B6%E...

I had to add this to the CM7 header

derekcook_0-1656615466407.png

 

Then I had to add unlocking the DWT registers

derekcook_1-1656615488579.png

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,286件の閲覧回数
derekcook
Senior Contributor I

It looks like the debugger unlocks the DWT but you have to do this yourself if not using the debugger. See this post: https://community.nxp.com/t5/Kinetis-Microcontrollers/KV58-DWT-Delay-Problem-DWT%E5%BB%B6%E6%97%B6%E...

I had to add this to the CM7 header

derekcook_0-1656615466407.png

 

Then I had to add unlocking the DWT registers

derekcook_1-1656615488579.png

 

0 件の賞賛
返信
2,290件の閲覧回数
ErichStyger
Specialist I

Are you using printf with semihosting?

If so, not having the correct hardfault handler will cause your target to stop if you print something.

0 件の賞賛
返信