Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CC2540 SimpleBLEPeripheral UART with DMA not working

$
0
0

Hello Everybody,

I try to get the DMA Mode working on my PAN1720, which has an CC2540-Chip.
When I use UART without DMA, transmitting works fine. But when I try to use DMA, on the TxD-Pin i cant see nothing on my oscilloscope.
I am using the SimpleBLEPeripheral example.

Here my settings:

#define HAL_AES_DMA TRUE
#define HAL_DMA TRUE
#define HAL_UART TRUE
#define HAL_UART_DMA 1
#define HAL_UART_ISR 0

Code in SimpleBLEPeripheral_Init.c

halUARTCfg_t UARTConfig;
      UARTConfig.configured = TRUE;
      UARTConfig.baudRate = HAL_UART_BR_9600;
      UARTConfig.flowControl = HAL_UART_FLOW_OFF;
      UARTConfig.flowControlThreshold = 28;
      //UARTConfig.idleTimeout = 100;
      UARTConfig.intEnable = FALSE;
      UARTConfig.rx.maxBufSize = 128;
      UARTConfig.tx.maxBufSize = 128;
      UARTConfig.callBackFunc = NULL;
     
      //opening port
   
      HalUARTOpen (HAL_UART_PORT_0, &UARTConfig);
      int8 test[]={0x00,0x01,0x02,0x03};
      HalUARTWrite(HAL_UART_PORT_0,(char*)test,sizeof(test));

If I change the settings to HAL_UART_ISR 1 and HAL_UART_DMA , the transmission works fine.
Unfortunately, I need the DMA mode.

I am thankful for all information and help!


Viewing all articles
Browse latest Browse all 262198

Trending Articles