Print the raw data generated by the uxTaskGetSystemState() function to uart

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Print the raw data generated by the uxTaskGetSystemState() function to uart

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by julitoss on Mon Oct 21 09:35:56 MST 2013
Hi,
How could I print the raw data generated by the uxTaskGetSystemState() function to uart?
Thanks,
Julito
0 Kudos
3 Replies

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon Oct 28 09:50:41 MST 2013
you could just use on of the examples in the LPCXpresso (e.g. lpc17xx\examples.lpc17xxnew.zip\uart
That example shows how to write characters and a string to the uart. For formatting, using sprintf.

The nice way is of course to create a write function that attaches to printf (lib_small_printf_m3 in the same .zip file).

Rob
0 Kudos

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by julitoss on Mon Oct 28 04:43:01 MST 2013
Thanks, but I would like to know how to send a string  (store in write buffer) to uart
Julito
0 Kudos

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Sat Oct 26 07:50:32 MST 2013
If you want to print the raw data in a readable form:

for(i=0; i< max_index; i++)
{
printf("Task: [%d] \"%s\" is in state: ", taskStatusArray.xTaskNumber, taskStatusArray.pcTaskName);

switch(taskStatusArray.eCurrentState)
{
case eReady:printf("Ready\n");
break;
case eRunning:printf("Running\n");
break;
case eBlocked:...
case eSuspended:...
case eDeleted:...
}

printf(...);
}

0 Kudos