LPC55S69 problem with PRINTF

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC55S69 problem with PRINTF

跳至解决方案
925 次查看
Anonymous
不适用

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 项奖励
回复
1 解答
903 次查看
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

在原帖中查看解决方案

2 回复数
904 次查看
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

877 次查看
Anonymous
不适用

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 项奖励
回复