USART, RS-485, and FreeRTOS in ASF

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

I used ASF to set up a project where I use the FreeRTOS USART library.

However, I don't see any way to set it up to use RS-485.

I believe I'm supposed to use the API freertos_usart_serial_init(), which takes a parameter of type freertos_peripheral_options_t.

Within those options, there is a field for operation mode, and the options are:

USART_RS232,

UART_RS232,

SPI_MASTER,            

TWI_I2C_MASTER,

TWIHS_I2C_MASTER

 

I believe you could set it up as RS232 (that's what the SAM driver does), but later on you need to set the RS_485 flag.

Should I just go around the driver to set that 485 flag?

Last Edited: Thu. Apr 21, 2022 - 03:39 AM