LPC1769 M2M DMA transfer not working after power on

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by thedaz on Sun Apr 03 03:40:05 MST 2016
I'm using the Embeded Artists LPCXpresso1769 board and trying to do my first baby steps getting the DMA to work. My test code triggers a memory-to-memory DMA transfer and everything works great when using the debugger or immediately after flashing. However, as soon as I disconnect and reconnect the power supply the program fails. The DMA transfer itself pretends to have succeeded, however, in fact it just copied up to 12 words (using DMA channel 0, fewer words when using the higher DMA channels) so the comparison of the source and destination buffers fails when using buffer sizes above this limit. Pushing the reset button doesn't make a difference : after flashing the program works ok even after a reset. After power off/on a reset doesn't change anything and the program keeps failing.

Since the program works ok after flashing or during debug there's obviously something I missed when initializing the board. I tried various implementations with and without the LPCOpen library but couldn't get things to work reliably. Any help would be greatly appreciated. Thanks.

PS: I'm using the lpcopen_2_10_lpcxpresso_nxp_lpcxpresso_1769.zip library that came with LPCXpresso v. 8.1.4

PPS: Building a release binary makes the code fail independent of cycling the power or not. In this case it succeeds to copy only 4 words out of 32.

Original Attachment has been moved to: TestDMA.c.zip