This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I do not use DMA and UART_readPolling for entering LPDS.
But it cause a problem sometimes that the cc3235 module seems to be stuck with uart receive processing.
So I revert code to use DMA and UART_readPolling and I'm trying to find a way to use LPDS.
My scenario is that,
1. Stop the 'while' process in ATCommands_readCmd() to stop UART_readPolling in the GetRawCmd() when the timer expired.
2. Call ATCommands_readCmd() when it wakes up from LPDS.
But it still cannot go into LPDS when the timer expired because of the DMA, I think.
So I need to initialize or de-initialize the DMA or UART in the timer callback and wakeup callback function.
How can I do that??
void timerCallback(Timer_Handle myHandle, int_fast16_t status)
{
stopReadPolling = true;
UART_disableRx();
Power_enablePolicy();
}
void wakeupFromLPDS(uint_least8_t argument)
{
stopReadPolling = false;
Power_disablePolicy();
UART_enableRx();
timerStart();
ATCommands_readCmd();
}
Thanks,
Calvin
Hi Calvin,
UART with DMA does not have a good way to close and reopen the DMA from the application, since the UART driver is expecting a certain DMA handle internally. Your options are to:
Additionally, what timer mode are you using? If you are using continuous mode, the MCU cannot enter LPDS if the hardware timer is still running. A software alternative that works with the TI Drivers power policy is the POSIX timer handled by the RTOS in source/ti/posix/<compiler>/time.h.
Best regards,
Sarah
Hi Sarah,
I'm using oneshot callback mode for timer.
I solved the problem what I mentioned.
"But it cause a problem sometimes that the cc3235 module seems to be stuck with uart receive processing."
It's from my recent wrong modification about the timer. I fixed it and no more problem.
Maybe I'll try the #3 option to use DMA.
Thanks,
Calvin