Other Parts Discussed in Thread: ENERGYTRACE
Tool/software: Code Composer Studio
Hi,
we would like to optime the power consumption of our custom board. We have test the EnergyTrace with RF Core and we got really good results. We would like to optimze the power consumption while reading some sensor values through UART, but we cannot get any state changes related with uart from EnergyTrace. (The sensor and Uart communication is working)
Here is our test code for Energy consumption:
void TestUartPower() { UART_Params_init(&scd30UartParams); scd30UartParams.writeDataMode = UART_DATA_BINARY; scd30UartParams.readDataMode = UART_DATA_BINARY; scd30UartParams.readReturnMode = UART_RETURN_FULL; scd30UartParams.readEcho = UART_ECHO_OFF; scd30UartParams.readMode = UART_MODE_CALLBACK; scd30UartParams.readCallback = SCD30UartReadCallback; scd30UartParams.writeMode = UART_MODE_BLOCKING; scd30UartParams.baudRate = 19200; scd30UartParams.dataLength = UART_LEN_8; scd30UartParams.stopBits = UART_STOP_ONE; scd30UartParams.parityType = UART_PAR_NONE; scd30UartParams.readTimeout = BIOS_WAIT_FOREVER; scd30UartParams.writeTimeout = BIOS_WAIT_FOREVER; while (1) { scd30UartHandle = UART_open(Board_UART1, &scd30UartParams); if (scd30UartHandle == NULL) { LOG(LOG_SENSOR_LEVEL, "Cannot UART_open"); return STATUS_FAIL; } UART_control(*handle, UARTCC26XX_CMD_RETURN_PARTIAL_ENABLE, NULL); UART_control(*handle, UARTCC26XX_CMD_RX_FIFO_FLUSH, NULL); UART_read(scd30UartHandle, readBuffer_, sizeof(readBuffer_)); UART_control(scd30UartHandle, UART_CMD_RXDISABLE, NULL); Task_sleep(200 * SC_MILLISECOND); UART_control(scd30UartHandle, UART_CMD_RXENABLE, NULL); Task_sleep(200 * SC_MILLISECOND); UART_readCancel(scd30UartHandle); UART_close(scd30UartHandle); Task_sleep(200 * SC_MILLISECOND); } }
Here is the output of EnergyTrace:
Here are my questions:
1- I could not see ant state transition in UART1, why?
2- The SERIAL_PD is seems to be off, is that correct?
3- There are no UART related interrupts, is that correct?
Best Regards