Hi everyone,
I'm working on an LPCXpresso55S69 EVK board and having some troubles with PRINTF.
What I want to do: I want to send some data from the uC via UART to the host computer. As I want to send an uint8_t array with 1000 bytes, I have implemented a loop which sends one byte after another with PRINTF. Oddly the uC sometimes sends a bunch of wrong characters before continuing with the correct ones. But where do these wrong characters come from?
this is what I send:
this is what I receive:
the green data is sent and then follow some characters (highlighted in blue) and then the red data is sent -> where does this blue highlighted data come from?
I would be glade if someone could help me.
Best regards
Ximena
my code looks something like this:
for(uint32_t j = 0; j < 1000; j++){
if(data[j] <= 0xf){
PRINTF("0");
}
PRINTF("%x", data[j]);
}
PRINTF("\n");
and I also tried
size_t length = 1;
status_t uresult;
for(uint32_t j = 0; j < 1000; j++){
uresult = USART_WriteBlocking(USART0,&data[j],length);
}
PRINTF("\n");
已解决! 转到解答。
Hello Ximena,
A similar behavior has been reported when using the CMSIS-DAP firmware, like in the thread below.
If you haven’t, would you please try using the J-Link firmware to see if this problem is still present?
Regards,
Gustavo
Hello Ximena,
A similar behavior has been reported when using the CMSIS-DAP firmware, like in the thread below.
If you haven’t, would you please try using the J-Link firmware to see if this problem is still present?
Regards,
Gustavo
Hi Gustavo,
thanks for your answer. I will try this out this week and report back if it worked.
Report:
Perfect, it works now and only sends the correct number of characters when using the J-Link firmware!!!
Best regards
Ximena