I've rewritten an UART driver since I was not happy with the CSMIS one. Now I want to use GPDMA_LPC17xx in this driver.
Including the header file:
#include "GPDMA_LPC17xx.h" // Keil::Device:GPDMA
This gives me problems using the GPDMA functions (of course, there are extern declarations there)
Error: L6218E: Undefined symbol GPDMA_Initialize() (referred from uartcontroller.o). Error: L6218E: Undefined symbol GPDMA_ChannelConfigure(unsigned char, unsigned, unsigned, unsigned, unsigned, void(*)(unsigned)) (referred from uartcontroller.o). Error: L6218E: Undefined symbol GPDMA_PeripheralSelect(unsigned char, unsigned char) (referred from uartcontroller.o).
Including the "GPDMA_LPC17xx.c" makes me able to at least compile the software. It does also run once, but the interrupts are not called so it stops there.
This is the code I run to send a data buffer to UART
if (evt.value.v & SIGNAL_UART_DATA_READY) { //UART->THR = 0x01; GPDMA_PeripheralSelect (GPDMA_CONN_UART0_Tx, 0U); // Configure DMA channel stat = GPDMA_ChannelConfigure (RTE_UART0_DMA_TX_CH, (uint32_t)pSendDataBuffer, (uint32_t)(&(UART->THR)), GPDMA_CH_CONTROL_TRANSFERSIZE(100) | // size GPDMA_CH_CONTROL_SBSIZE(GPDMA_BSIZE_1) | GPDMA_CH_CONTROL_DBSIZE(GPDMA_BSIZE_1) | GPDMA_CH_CONTROL_SWIDTH(GPDMA_WIDTH_BYTE) | GPDMA_CH_CONTROL_DWIDTH(GPDMA_WIDTH_BYTE) | GPDMA_CH_CONTROL_I | GPDMA_CH_CONTROL_SI, GPDMA_CH_CONFIG_DEST_PERI( GPDMA_CONN_UART0_Tx) | GPDMA_CH_CONFIG_FLOWCNTRL(GPDMA_TRANSFER_M2P_CTRL_DMA) | GPDMA_CH_CONFIG_IE | GPDMA_CH_CONFIG_ITC | GPDMA_CH_CONFIG_E, USART0_DMA_callback); if (stat == -1) __breakpoint(0); }
This works once, then the breakpoint triggers.
Am I doing something wrong with the including part or is just my GPDMA trigger wrong?
View all questions in Keil forum