hi, when I use cc2540 and it's uart port, it works fine.
But when i changed to PWRMGR_BATTERY by define POWER_SAVING, it will cause a receive data lose.
I'm not using the hci, neight HCI_EXT_HaltDuringRfCmd nor HCI_EXT_ClkDivOnHaltCmd is called.
So, if I want to use UART while power saving, is there anyway to do this?
someone said that one line for interrupt is needed for weak up the cc2540, if it is true, how to do this?
I saw the code in _hal-uart_dma.c:
#if (HAL_UART_DMA == 1)
HAL_ISR_FUNCTION(port0Isr, P0INT_VECTOR)
#else
HAL_ISR_FUNCTION(port1Isr, P1INT_VECTOR)
#endif
{
HAL_ENTER_ISR();
PxIFG = 0;
PxIF = 0;
dmaRdyIsr = 1;
#ifdef POWER_SAVING
CLEAR_SLEEP_MODE();
(void)osal_pwrmgr_task_state(Hal_TaskID, PWRMGR_HOLD);
#if HAL_UART_TX_BY_ISR
if ( dmaCfg.txHead == dmaCfg.txTail )
{
HAL_UART_DMA_CLR_RDY_OUT();
}
#endif
#endif
HAL_EXIT_ISR();
}
#endif
is it used for this purpose?
By the way, i'm using BLE stack V1.4 and uart DMA mode could not solve the problem.