Configure UART on Mbus, SAMA5D27

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello. I am using SAMA5D27-som1-ek. I need to configure uart2 (mbus2). Here is my code above. It can't get out from while loop. I am sorry if this is not forum for this kind of question. I am new to forum and programming.

Thanks,

Ana

 

uint32_t mode = UART_MR_CHMODE_NORMAL | UART_MR_PAR_NO ;

pio_configure(uart2_pins, ARRAY_SIZE(uart2_pins));

uart_configure(UART2_ADDR, mode, 115200);

 

uart_set_transmitter_enabled(UART2_ADDR, true);

uart_set_receiver_enabled(UART2_ADDR, true);

 

while (uart_is_tx_ready(UART2_ADDR)==false)

 

{

printf("not ready\r\n");

 

}

 

 

Last Edited: Thu. Jan 23, 2020 - 02:20 PM