CC2541 UART發送問題
在event 中用HalUARTWrite(HAL_UART_PORT_0,"a",1);發送後, cc2541 的電流保持8.xmA.如果沒有這句,能自動進入pm2和pm3.
program 為keyfobdemo.後加_hal_uart_dma.c.
defined如下:
INT_HEAP_LEN=3000
HALNODEBUG
OSAL_CBTIMER_NUM_TASKS=1
HAL_AES_DMA=TRUE
POWER_SAVING
xPLUS_BROADCASTER
HAL_LCD=FALSE
HAL_LED=TRUE
CC2540_MINIDK
ACC_BMA250
DC_DC_P0_7
HAL_UART=TRUE
HAL_DMA=TRUE
uartConfig如下:
halUARTCfg_t uartConfig;
uartConfig.configured = TRUE;
uartConfig.baudRate = HAL_UART_BR_9600;
uartConfig.flowControl = HAL_UART_FLOW_OFF;
uartConfig.flowControlThreshold = 48;
uartConfig.idleTimeout = 6;
uartConfig.rx.maxBufSize = 128;
uartConfig.tx.maxBufSize = 128;
uartConfig.intEnable = TRUE;
// uartConfig.rxChRvdTime =
uartConfig.callBackFunc = NULL;
HalUARTOpen (HAL_UART_PORT_0, &uartConfig)
另將CTS 腳踫一下GND,CC2541 就可以進入pm3.
請問如何將cc2541 在event 中發送uart 通過dma後, 又可以自動進入pm2或pm3?
help
使用串口前,调用osal_pwrmgr_device( PWRMGR_ALWAYS_ON );
使用完毕后,调用osal_pwrmgr_device( PWRMGR_BATTERY ); 恢复省电模式