store data into SPIFI and relocate code into RAM

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

store data into SPIFI and relocate code into RAM

1,130 Views
navidfanaee
Contributor III

Hi 

I am using Lpc-link2 (lpc4370) for the purpose of converting analog signal to digital at the rate of 60MHz. However as the usb max rate is 60Mb/s it seems i have to store the coming data to SPIFI memory. I appreciate it if you could please help me how can i do it. do I have to relocate my whole code into RAM ? 

Thank you in advance

Labels (1)
6 Replies

1,004 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Navid,

I agree with you that none of the serial communication protocols on the chip can support speed up to 120MBps, the only solution is to save thew samples to internal SRAM, but the size of internal SRAM is the limit you can acquire the number of samples.

If you design board based on LPC4370, I suppose that you can connect external SRAM or SDRAM via EMC so that a large number of samples can be saved into external SRAM or SDRAM.

BR

XiangJun Rong

1,004 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Navid,

As you know that the LPC4370 has on-chip SRAM, we have the code to convert the analog signal at 80MSPS and save the samples in on-chip SRAM via DMA, after the predefined number of samples have been acquired, stop to convert. After the ADC has stopped, I think you can begin to  transfer the samples in on-chip SRAM to USB.

It is not necessary to save the samples in SPI flash if you do not want to save sample after power off.

Hope it can help you

BR

Xiangjun Rong

0 Kudos
Reply

1,004 Views
navidfanaee
Contributor III

hi xiangjung 

thank you for your reply. yes the data is stored in SRAM but considering the limited size of SRAM and the fact that USB speed is less than ADC, i thought maybe i could store data in SPIFI memory which is enough for my application (1024K) and have my ADC working in max possible speed.

Thanks 

0 Kudos
Reply

1,004 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Navid,

I do not think your solution is feasible that you want to save samples into on-board spi flash. I copy the specs of W25Q80, the page program time(256 Byte for one page) is 0.8mS, 1024K bytes take 0.8mS*(1024K/256)=3.2S to program  into flash. But acquiring 1024Kbyts samples just takes 1/60S=16mS.

In conclusion, it is not feasible to use SPI flash as a buffer to save samples.

Hope it can help you

BR

XiangJun Rong

pastedImage_1.png

1,004 Views
navidfanaee
Contributor III

hi xiangjung 

sorry i am totaly new to LPC, as i previously told i'm trying to get lpc4370's (lpc-link2) ADC working at 60MSps, however it seems none of the serial communication protocols on the chip can support speed up to 120MBps (LPC stores each sample in 2 bytes). what do you suggest if I want to use ADC real time?

0 Kudos
Reply

1,004 Views
navidfanaee
Contributor III

hi xiangjung 

thank you for your quick and concise reply. yes its perfectly makes sense. therefore i have to opt for a protocol other than USB which can transfer at the speed of 120MB/s.

0 Kudos
Reply