LPC54616 USART up to 2.5Mbps???

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

LPC54616 USART up to 2.5Mbps???

760 Views
Johney
Contributor I

Hi 

  In the previous project, I use LPC2364's USART with 2.5Mbps.  It works fine.

  I need move the project with LPC54616 microcontroller. 

  I reference the USART demo and found the BOARD_InitDebugConsole() in the board.c.

  Here I speed up the baud rate and verify by the oscilloscope.

status_t BOARD_InitDebugConsole(void)
{
    status_t result;
    /* attach 12 MHz clock to FLEXCOMM0 (debug console) */
    CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH);
    RESET_PeripheralReset(BOARD_DEBUG_UART_RST);
    result = DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE,     1200000U, BOARD_DEBUG_UART_TYPE, BOARD_DEBUG_UART_CLK_FREQ);

assert(kStatus_Success == result);
return result;
}

IMG_20210504_1.2Mbps.jpg

When I speed up to 1.2Mbps, it works fine. But I raised up to 1.3Mbps, I see nothing in the oscilloscope.

Do I need to use another clock source?   or other parameters?   

Any suggestions are welcome.  I will try and post the result.

0 Kudos
3 Replies

743 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

Hope you are well.
I suggest you use another clock source, 48Mhz is the maximum clock speed supported for flexcomm.
I do not suggest using the same interface used for debugging, please use another interface.
To modify the baudrate, you may update the value of the variable baudRate_Bps in the usart_config_t type before calling the function USART_Init.

To verify that this works, I used the flexcomm2 interface with a baudrate of 1.5Mbps. I attached a 48Mhz clock to the interface.

Omar_Anguiano_0-1620418877324.png

Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar

0 Kudos

730 Views
Johney
Contributor I

Hello Omar_Anguiano:

It is difficult to move Flexcomm0 to Flexcomm2 in my borad.

I still use Flexcomm0 for testing.

I use the 48Mhz clock source. Here is my code.

CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH);
RESET_PeripheralReset(BOARD_DEBUG_UART_RST);
result = DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, 5300000U, BOARD_DEBUG_UART_TYPE, 48000000U);

In the baudrate parameter, I use 5.3Mbps and it works at 1.33Mbps.(see attached picture)

I don't know why but it is not the most important.

It still can not up to 2.25Mbps. Can you try to speed up to 2.5Mbps by Flexcomm2??

IMG_20210511_161059.jpg

0 Kudos

692 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

I apologize for my late reply. I did some tests to check if these speeds are reachable. 5.3Mbps and 3Mbps were successful.
2.5Mbps was not possible because this baud rate is not supported. The OSR and BRG values can't reach that speed, if you set it to 2.4Mbps it will work as expected.

 

Omar_Anguiano_3-1621972458766.png

Omar_Anguiano_2-1621972434301.png

To successfully attach the clock you may use the function CLOCK_AttachClk(), I suggest you use the MCUXpresso Config tool to set the HF clock to 48Mhz and attach it to the peripheral.

Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar

 

0 Kudos