lpcware

Typo in LPC15xx Sample: periph_dma_rom_uart

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by R2D2 on Mon Dec 15 01:55:37 MST 2014
LPC15xx LPCOPEN Sample periph_dma_rom_uart isn't working because a typo is preventing a necessary alignment  :((


dma_rom_uart.c:82 is causing a hard fault:


#if defined( __GNUC__ )
/* GNU alignment to 512 bytes */
static uint8_t dma_ram_block[RAMBLOCK][color=#f00];[/color] __attribute__ ((aligned(512)));
#endif /* defined (__GNUC__) */


Correct alignment solves this problem:

#if defined( __GNUC__ )
/* GNU alignment to 512 bytes */
static uint8_t dma_ram_block[RAMBLOCK] __attribute__ ((aligned(512)));
#endif /* defined (__GNUC__) */


See: http://www.lpcware.com/content/forum/periphdmaromuart-example-fail

Outcomes