Tool/software: Code Composer Studio
Hi,
We are using CC1350 Launchpad. We are using this code for see the values on Data Variable Tracing. But When We start project, We just see 2,3 or 4 values. But We want to see all values When We suspended the code.
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <ti/devices/cc13x0/driverlib/ioc.h>
#include "ITM.h"
const unsigned ITM_BASE_ADDRESS = 0xE0000000;
ITM_port_t port;
unsigned trial_num, port_num = 1;
void delay(unsigned num_loops)
{
unsigned i;
for (i=0; i<num_loops; i++)
{
asm ("NOP");
}
}
void port_wait(ITM_port_t port)
{
delay(10);
/* Wait while fifo ready */
while (*port == 0);
}
/* Send a nul terminated string to the port */
void ITM_put_string(ITM_port_t port, const char* data)
{
unsigned datapos = 0;
unsigned portpos = 0;
unsigned portdata = 0;
while('\0' != data[datapos])
{
port_wait(port);
portdata = 0;
/* Get the next 4 bytes of data */
for (portpos=0; portpos<4; ++portpos) {
portdata |= data[datapos] << (8*portpos);
if ('\0' != data[datapos]) {
++datapos;
}
}
/* Write the next 4 bytes of data */
*port = portdata;
}
delay(200);
}
/* Send a 32 bit value to the port */
void ITM_put_32(ITM_port_t port, unsigned data)
{
port_wait(port);
*port = data;
delay(200);
}
/* Send a 16 bit value to the port */
void ITM_put_16(ITM_port_t port, unsigned short data)
{
/* Cast port for 16-bit data */
volatile unsigned short* myport = (volatile unsigned short*)port;
port_wait(port);
*myport = data;
delay(200);
}
/* Send a 8 bit value to the port */
void ITM_put_08(ITM_port_t port, unsigned char data)
{
/* Cast port for 8-bit data */
volatile unsigned char* myport = (volatile unsigned char*)port;
port_wait(port);
*myport = data;
delay(200);
}
/* Creat Post adress */
ITM_port_t Port_adress(unsigned data)
{
ITM_port_t port;
unsigned port_address;
port_address = ITM_BASE_ADDRESS + (4*data);
port = (ITM_port_t)port_address;
return port;
}
Firstly We tried this code with pinStandby_CC1350 example. We create a counter in example for trace on Data Trace Graph.And We see this.
After We deleted the TaskSleep() command in example. When We deleted it We saw 96 values.
1-) How Can We see all the values When We suspented the code?
2-) Why Did We see more values When We deleted TaskSleep() command ?