Other Parts Discussed in Thread: ENERGYTRACE,
Tool/software: Code Composer Studio
Hi,
I'm trying to determine how much power is consumed when copying two data buffers (~3KB in total) to/from SRAM <-> FRAM. I'm using memcpy to copy data between SRAM and FRAM, not using DMA.
I'm trying to use EnergyTrace (CCSv8) for this purpose. I have set markers in the code (e.g. toggling GPIO / output to UART etc.) but these markers are not seen in the Energy Trace power output (attached).
The initial spike seen is I think the clocks being setup ?, but where's the gpio toggling power consumption ?
The whole FRAM<->SRAM data transfer takes about 3ms each, so i've zoomed in the plot.
CPU is running in Active power mode. Energy trace is used in standalone mode.
Is there a better way to determine the power consumption for a FRAM read/write ?
Thank you
I have some code like the following:
/* * main.c * */ #include "conf.h" #include "utils/myuart.h" /******************************************************* * Globals *******************************************************/ unsigned char Buff_First[16*96]; unsigned char Buff_Second[16*96]; uint8_t *Buff_First_ptr = (uint8_t *)&Buff_First; uint8_t *Buff_Second_ptr = (uint8_t *)&Buff_Second; /******************************************************* * FUNC DEFS *******************************************************/ void benchmark_buff_checkpoint_latency(void); /************************************************************************************* * MAIN *************************************************************************************/ void main(void) { /* mandatory init stuff */ WDTCTL = WDTPW | WDTHOLD; //Stop WDT PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode to activate previously configured port settings system_init(); // init clocks, UART setupDebugPins(); // setup pins as output GPIO pins benchmark_buff_checkpoint_latency(); while(1){ __no_operation(); } } /************************************************************************************* * BENCHMARKING *************************************************************************************/ void benchmark_buff_checkpoint_latency(void){ _DBGUART("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa %d \r\n", 123); _DBGUART("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa %d \r\n", 123); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); /* from SRAM to FRAM */ Buffer_backup(Buff_First_ptr, Buff_Second_ptr); _DBGUART("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa %d \r\n", 123); _DBGUART("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa %d \r\n", 123); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); /* from FRAM to SRAM */ Buffer_restore(Buff_First_ptr, Buff_Second_ptr); _DBGUART("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa %d \r\n", 123); _DBGUART("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa %d \r\n", 123); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); GPIO_toggleOutputOnPin( GPIO_PORT_P1, GPIO_PIN1 ); }