KV56 Does not run without debugger connected

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

KV56 Does not run without debugger connected

跳至解决方案
2,265 次查看
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,258 次查看
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,259 次查看
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,263 次查看
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 项奖励
回复