Other Parts Discussed in Thread: CC1312R
Hello,
I am using CC1312R collector and sensor example code.
The current consumption of the sensor example code while it is in sleep, shows about 120 uA.
I added UART2 to the sensor example code, following the uart2callback.c example from TI Resource Explorer web page:
void callbackFunc(UART2_Handle handle, void *buffer, size_t count,void *userArg, int_fast16_t status)
{
Semaphore_post(semUartHandle);
}
Void uartTask(UArg a0, UArg a1)
{
char input;
UART2_Handle uart;
UART2_Params uartParams;
uint32_t status = UART2_STATUS_SUCCESS;
/* Create a UART in CALLBACK read mode */
UART2_Params_init(&uartParams);
uartParams.readMode = UART2_Mode_CALLBACK;
uartParams.readCallback = callbackFunc;
uartParams.baudRate = 115200;
uart = UART2_open(CONFIG_UART2_0, &uartParams);
while (1) {
status = UART2_read(uart, &input, 1, NULL);
if (status != UART2_STATUS_SUCCESS) {
/* UART2_read() failed */
while (1);
}
/* Wait until read callback executes - Get access to resource */
Semaphore_pend(semUartHandle, BIOS_WAIT_FOREVER);
.
.
}
}
While UART2 thread is in Semaphore_pend (system should be in sleep low power) my current consumption is about 1600 uA.
How can I make CC1312 go back to sleep low power while UART thread is waiting to receive a byte?
Best regards,
Dani