CSR1010 UART
遇到一个奇怪的问题,CSR1010 的SPI DEBUG 脚的CS脚拉低 RX可正常接收,CS悬空RX接收不到数据,哪位大侠遇到过,求解void uartInit(void)
{
/* Initialise host interface driver */
UartInit(uartDataInFn,
0, /* uart_data_out_fn */
uartRxBuffer, UART_BUF_SIZE_BYTES_64,
uartTxBuffer, UART_BUF_SIZE_BYTES_64,
uart_data_unpacked);
UartConfig(0x01d9, 0); /*UART_RATE_9K6 = 0x0028;UART_RATE_115K2 = 0x01d9*/
UartEnable(TRUE);
uart_receive.rec_len = 0;
/* Request notification from the UART when enough data arrives
* to form a message header.
*/
UartRead(MESSAGE_HEADER_LENGTH_BYTES, 0);
SleepModeChange(sleep_mode_never);
}
在uartInit中添加SleepModeChange(sleep_mode_never);问题解决,不知为什么
uart只有在一个2k4的pbs下才能在低频下接收,其他的波特率必须要sleep_mode_never或者sleep_mode_shallow才可以
xxhuan_2003 发表于 2016-1-15 10:18
uart只有在一个2k4的pbs下才能在低频下接收,其他的波特率必须要sleep_mode_never或者sleep_mode_shallow才 ...
原来是这样:victory:
xxhuan_2003 发表于 2016-1-15 10:18
uart只有在一个2k4的pbs下才能在低频下接收,其他的波特率必须要sleep_mode_never或者sleep_mode_shallow才 ...
以前测试这两种省电模式也不能保证稳定,不知道现在怎么样了
bluetooth_ble 发表于 2016-2-24 09:36
以前测试这两种省电模式也不能保证稳定,不知道现在怎么样了
我用这2个模式,115200和9600都很好,没有出现过丢失数据的现象,但要要注意,UART收发不能同时进行
xxhuan_2003 发表于 2016-2-25 10:28
我用这2个模式,115200和9600都很好,没有出现过丢失数据的现象,但要要注意,UART收发不能同时进行
哦,明白了
还有入手,先学习下
功夫好柔人员投入
学习学习.
页:
[1]