TI中文支持网
TI专业的中文技术问题搜集分享网站

BLE uart

我希望我的UART收到一包数据,只调用一次回调函数,而不是一个字节调用一次,DMA的这一段要怎么配置?

    uartConfig.configured           = TRUE;     uartConfig.baudRate             = HAL_UART_BR_38400;     uartConfig.flowControl          = FALSE;     uartConfig.flowControlThreshold = 128;     uartConfig.rx.maxBufSize        = 128;     uartConfig.tx.maxBufSize        = 128;     uartConfig.idleTimeout          = 6;     uartConfig.intEnable            = TRUE;     uartConfig.callBackFunc         = UserUartBack

Jerry:

Are you using TI BLE version 1.3.x ?

The above setting do not affect the UART packet receive. It just set the UART setting itself. By using DMA, it will receive a packet in the 128 bytes buffer and waiting for applicaiton to process.

Generally, if you are using TI BLE code, just define HAL_UART and DMA_PM=0. The UART will configure in DMA automatically.

zhiyuan yan:

回复 Jerry:

假设我给uart写一串数据11 22 33 44 的时候 uartRxCB 接收的回调函数是调用了四次  我是想就只调用一次callback函数 要怎么解决?

赞(0)
未经允许不得转载:TI中文支持网 » BLE uart
分享到: 更多 (0)