LPC55S69 problem with PRINTF

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

LPC55S69 problem with PRINTF

Jump to solution
673 Views
Anonymous
Deactivated User

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:

picture2.png

this is what I receive:

picture1.png

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");

 

0 Kudos
1 Solution
651 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ximena,

A similar behavior has been reported when using the CMSIS-DAP firmware, like in the thread below.

https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USART-driver-duplicate-bytes-being-sent-u...

If you haven’t, would you please try using the J-Link firmware to see if this problem is still present?

Regards,
Gustavo

View solution in original post

2 Replies
652 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ximena,

A similar behavior has been reported when using the CMSIS-DAP firmware, like in the thread below.

https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-USART-driver-duplicate-bytes-being-sent-u...

If you haven’t, would you please try using the J-Link firmware to see if this problem is still present?

Regards,
Gustavo

625 Views
Anonymous
Deactivated User

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

0 Kudos