J-link (SWD) can flash the firmware but debug is not always working

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

J-link (SWD) can flash the firmware but debug is not always working

1,251 次查看
Ronaa
Contributor II

We have a custom board with LPC54608 and SRAM.

We work with MCUXpresso 11.7 or 11.8 and SDK 2.13 or 2.14

We are able to flash the firmware using J-flash without any problem but we encounter problems trying to debug.

sometimes it is working and most of the time it is not. the IDE is stuck on some line which is not the start point and we cant do any action except stop debug.

We know about the conflicts between SDRAM pins and ISP pins so we put 10K pullups in the 3 pins and burned the OTP.

we have no idea what do do next.

i also want to verify that this OTP code is correct:

 

    CLOCK_EnableClock(kCLOCK_Otp);
    RESET_PeripheralReset(kOTP_RST_SHIFT_RSTn);
    otpversion = OTP_GetDriverVersion();
    OTP_EnableBankWriteMask(kOTP_Bank3);
    OTP_EnableBankWriteLock(kOTP_Bank2, kOTP_Word0, kOTP_Word1 | kOTP_Word2 | kOTP_Word3,  kOTP_LockDontLock);
    OTP_ProgramRegister(kOTP_Bank2, kOTP_Word0, 0x20);
    OTP_DisableBankWriteMask(kOTP_Bank3);

 

 

thanks 

0 项奖励
回复
3 回复数

1,060 次查看
Ronaa
Contributor II

We thought the  issue is related to the SDRAM and ISP pins.

We have the same processor in another board without external memory and it work just fine.

But, even after disabling the ISP via OTP it keeps failing. most of the time power toggle solves the issue, but again, not always.

0 项奖励
回复

1,186 次查看
frank_m
Senior Contributor III

> We are able to flash the firmware using J-flash without any problem but we encounter problems trying to debug.

> sometimes it is working and most of the time it is not. the IDE is stuck on some line which is not the start point and we cant do any action except stop debug.

The default setting of almost all debuggers is to run to main(), and stop there.
As a first thing, disable this setting and start debugging at the reset vector.

It seems you have identified the SDRAM pins/settings as potential cause.
But issues with the power supply or clock generation could be possible as well.

 

0 项奖励
回复

1,203 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Ronaa 

"sometimes it is working and most of the time it is not."

->> When it is working and not?

How about debug a simple led or hello world proejct?

 

BR

Alice

0 项奖励
回复