KL81 SWD access timeout

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KL81 SWD access timeout

687 Views
daweiy
Contributor I

Hi,

I have a board with KL81 amounted on it. I use IAR and J-link to debug it.

Everything was fine, until I started Flash programming test, I have killed 3 boards! The test I have done is just following the flash driver example in SDK’s driver examples.

 

What I found is if I erase one sector, the software resets. The reset is caused in one of the lines in function FlashCommandSequence()(I have put this function into RAM). If I trace this function one line by one line, there is no reset. So I added a delay after CCIF bit is set and the erasing seems fine. But when the code try to write something into this sector, reset happens again. Is there any configration I need to double check? Please advise!

 

After I tried few tests, suddenly my IAR IDE cannot connect to my board through the J-Link. The error message is: "Communication timed out: Requested 20 bytes, received 0 bytes!

Could not read hardware status!

Abort Debug session?"

I tried to use J-Link Commander, same results.I am pretty sure this J-Link is working because I can use it to connect to STM32 mcu. Below is the screen shot of the J-Link Commander

tt.jpg

0 Kudos
2 Replies

484 Views
daweiy
Contributor I

Another update, I made a silly mistake: didn't disable interrupt during Flash operation. Now all the Flash operations work fine after I disable the interrupts.

0 Kudos

484 Views
daweiy
Contributor I

Just a quick update: I connected SWD nRESET pin to MCU's RESET_b pin and SWD NC(pin 9) to ground, my J_Link can connect to KL81.

But my first question, Flash sector erasing can cause system reset, is still unsolved, please advise, thanks!

0 Kudos