2017-09-27 10:17 AM
Hello,
I am writing a test program on my board (xpc56xx evb motherboard) and I want to receive on my terminal throught the UART numbers and text strings.When I get the data on my serial terminal (RealTerm) I receive properly the strings ('Test program start') but not the variables' value (pcval1,pcval2,pcval3). (see screenshot).
This is my code:#include 'components.h'
uint32_t volatile *pcval;
uint32_t volatile cval;uint32_t volatile *pointer1;uint32_t volatile *pw;uint32_t volatile w = 0x000FFF;uint32_t volatile giri1,giri2,giri3;
/* * Application entry point. */int main(void) {/* Initialization of all the imported components in the order specified in
the application wizard. The function is generated automatically.*/ componentsInit();giri1=0x00000001;
giri2=0x00000002; giri3=0x00000003; /* * Activates the serial driver 1 using the driver default configuration. */ sdStart(&SD1, NULL); /* Application main loop.*/ while (1) { unsigned i;osalThreadSleepMilliseconds(100);
osalThreadSleepMilliseconds(100); osalThreadSleepMilliseconds(100); osalThreadSleepMilliseconds(100);chnWriteTimeout(&SD1, (uint8_t *)'Test program start\r\n', 20, TIME_INFINITE);
chnWriteTimeout(&SD1, (uint8_t *)'Test program start\r\n', 20, TIME_INFINITE);giri1=giri1+1;
pcval=&giri1; chnWriteTimeout(&SD1, (uint8_t *)pcval,4,TIME_INFINITE);giri2=giri2+1;
pcval=&giri2; chnWriteTimeout(&SD1, (uint8_t *)pcval,4,TIME_INFINITE);giri3=giri3+1;
pcval=&giri3; chnWriteTimeout(&SD1, (uint8_t *)pcval,4,TIME_INFINITE);chnWriteTimeout(&SD1, (uint8_t *)'\r\n',2,TIME_INFINITE);
}}is there a strategy with I can read proper values?
Thank you in advance!FabioSolved! Go to Solution.
2017-09-28 12:10 AM
Hello Fabio ,
I think that you use SPC5Studio.
You can use the Ouput Formatter to perform this task. (RLA or HAL)
Best Regards
Erwan
2017-09-28 12:10 AM
Hello Fabio ,
I think that you use SPC5Studio.
You can use the Ouput Formatter to perform this task. (RLA or HAL)
Best Regards
Erwan
2017-09-29 07:46 AM
Thank you Erwan