LPC5516 SRAM

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

LPC5516 SRAM

45 Views
1123HENRY
Contributor I

我正在使用LPC5516芯片

想通过SWD协议将芯片程序写入SRAM,并跑起来

但是发现程序并未写入SRAM

 

我已经通过SWD读到了芯片的IDCODE,并且完成了一些初始化,例如halt住内核之类的。

只是将程序写入0x04000000后,回读这段地址,发现读取到的数据是0.

 

通过例程,我将一些AHB的SRAM clock使用SWD协议进行开启,如:

SYSCON->AHBCLKCTRLSET[0] = SYSCON_AHBCLKCTRL0_SRAM_CTRL1_MASK | SYSCON_AHBCLKCTRL0_SRAM_CTRL2_MASK;

但是执行完上述程序后,写入到SRAM的程序回读还是0.

 

能否帮忙分析一下出现这个情况的原因

LPC551X-S1X 

 

0 Kudos
Reply
3 Replies

Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @1123HENRY 

1) Please try programming the SRAM at address 0x20000000 instead of the SRAMX region at 0x04000000.

2) Please use MCUXpresso IDE or LinkFlash with an external debugger to program the SRAM, capture the SWD signals/waveforms, and compare them with the waveforms observed in your programmer. 

 

BR

Alice

 

 

0 Kudos
Reply

22 Views
db16122
Contributor IV

more error log to share?

0 Kudos
Reply

11 Views
1123HENRY
Contributor I

I used my own chip to send SWD instructions to debug the LPC5516 chip. I attempted to write to the 0xE000EDF0 register, trying to enable debugging, but it didn't work.

Then, I attempted to write to the SRAM, but found that the write operation failed. It seems that the device did not enter the debugging mode.

test1.png

test2.png

test3.png

test4.png

  

0 Kudos
Reply