微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > BLE uart

BLE uart

时间:10-02 整理:3721RD 点击:

我希望我的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

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.

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

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top