LPC55S69 USART driver: duplicate bytes being sent using the SDK example

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

LPC55S69 USART driver: duplicate bytes being sent using the SDK example

Jump to solution
1,513 Views

Hi I'm having some issues with the USART driver on the LPC55S69-EVK. I'm creating a program which regularly transmits a large amount of data over the USART, however I started noticing a larger amount of bytes being received than what I transmitted. Looking into it, patterns of the data were being sent twice.

To isolate and replicate the issue I tried the SDK example "lpcxpresso55s69_usart_polling", slightly modified to send a shorter message, "Usart polling example\r\n", repeatedly, instead of echoing the received input. The same pattern of repeated bytes however started appearing here too, as seen in the picture below (also attached). Note how the sent text is sometimes broken off to be replaced by previous data (Usart polling exlling expolling example).

Screenshot from 2020-11-04 10-01-49.png

I've double checked the settings for the serial connection and I've tried both using the MCUXpresso IDE terminal and a python program reading the serial connection with the same results. I'm using the settings set in the SDK example, the debug link USB port connected to my laptop running Debian GNU/Linux.

I have the same issue when running the interrupt-based examples, rather than this polling one. It seems to be specific to this board and not my computer as I have a similar program on the LPC5411x (using the LPC5411x UART driver) which does not have any issues sending KBs of data.

I've also attached the modified code, the gist of it can be seen below. The problem persists whether the delay between messages is long or short. Thanks for having a look!

 

 

    ...
    USART_GetDefaultConfig(&config);
    config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE;
    config.enableTx     = true;
    config.enableRx     = false;

    USART_Init(DEMO_USART, &config, DEMO_USART_CLK_FREQ);
    USART_WriteBlocking(DEMO_USART, txbuff, sizeof(txbuff) - 1);
    while (1){
    	dummy_delay();
    	USART_WriteBlocking(DEMO_USART, txbuff, sizeof(txbuff) - 1);
    }
}

 

 

 

Labels (1)
0 Kudos
1 Solution
1,473 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @someoneWithUsartIssues,

I test this behavior using the evaluation board and could identify that this only is present while debugging using the CMSIS-DAP firmware. Are you debugging while this issues are present?

Also, if this is the case, can you try changing the LPC-Link firmware to the J-Link one to check if the behavior is present?

Best Regards,

Alexis Andalon

View solution in original post

2 Replies
1,474 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @someoneWithUsartIssues,

I test this behavior using the evaluation board and could identify that this only is present while debugging using the CMSIS-DAP firmware. Are you debugging while this issues are present?

Also, if this is the case, can you try changing the LPC-Link firmware to the J-Link one to check if the behavior is present?

Best Regards,

Alexis Andalon

1,437 Views

Thanks a lot!

It was indeed only present when using the CMSIS-DAP firmware. I can confirm that transmissions of large amounts of data were possible when I stopped debugging.

I have now changed to J-Link and everything works as it should. I am now able to transfer large amounts of data even when debugging.