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 件の賞賛
返信