GPDMA + SSP + LPC17xx

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

GPDMA + SSP + LPC17xx

398 Views
Solarhacker
Contributor II

GPDMA Read/Write using SSP to Macronix MX25L25625F Flash memory

Works correctly when software is downloaded and executed via MCUXpresso IDE

If I disconnect IDE debugger and then power cycle device only 1st byte of read sector is received, all other bytes remain at 0x5A as initialized before enabling DMA transfer.

After much experimentation if I place read buffer in RAMAHB32, DMA works after power cycle.

Changing read buffer location back to default RAM, DMA stops working after power cycle.

If firmware is executed via IDE debugger, it doesn't matter which ram zone read buffer is located.

0 Kudos
Reply
2 Replies

379 Views
Solarhacker
Contributor II

I moved all the buffers that are accessed by DMA which fixed issue. What I don't understand, before I moved all the DMA accessed buffers, DMA would function as expected if code is executed via MCUXpresso IDE, it would only fail after hardware reset to restart same firmware.

Thanks

Darren

0 Kudos
Reply

391 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As the following figure, the "32 kB local static RAM" which is located from address 0x1000_0000 is called local RAM, it means that only core(I-code bus and D-code bus) can access the RAM, DMA can not access the RAM.

The "AHB SRAM (2 blocks of 16 kB)" which is located from address 0x2007_C000 is global RAM, all the master such as  the DMA, core, USB, ethernet modules can access the RAM.

 

xiangjun_rong_0-1684909986108.png

In conclusion, you have to use the 32KB AHB SRAM if you use DMA to transfer data from/to SRAM.

Hope it can help you

BR

XiangJun Rong