FreeROTS - UART Interface Layer (service) Not work

I am using ATMEL Studio 7 with Arduino Due board and freeRTOS 7.3 and FreeROTS - UART Interface Layer (service) .

I am expecting it to be simple to use but unfortunately, it didn’t work and I cannot find any sample from Internet. I believe this is not official FreeRTOS library. It is Microchip library build on top of freeRTOS.

Since there is no sample I can get, Following is my best guess

uint8_t buffer[80];

const sam_uart_opt_t p_uart_opt = {
	.ul_mck =  sysclk_get_main_hz(),
	.ul_baudrate = 115200,
	.ul_mode = UART_MR_PAR_NO
};

const freertos_peripheral_options_t p_rtos_peri_opt = {
	.receive_buffer = buffer,
	.receive_buffer_size = 80,
	.interrupt_priority = configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1,
	.operation_mode = UART_RS232,
	.options_flags = USE_RX_ACCESS_MUTEX | WAIT_RX_COMPLETE
};

freertos_uart_if fif = freertos_uart_serial_init(UART, &p_uart_opt, &p_rtos_peri_opt);
uint8_t data[1];
uint32_t x = freertos_uart_serial_read_packet(fif, data    , 1, (portTickType) 1000);

What else I need to do to make this work?

Thanks

Joseph

@ support@microchip.com can you please reply

Have you also tried updating to latest version of FreeRTOS and running your application?

I think the freertos_uart_serial_nnn function give mutexes from interrupt service routines, which can’t be done in recent versions of FreeRTOS, so if updating the RTOS version you would have to change the xSemaphoreCreateMutex() calls (in the driver) to xSemaphoreCreateBinary() instead.

Thanks for the reply. I think this is correct. The Atmel ASF come with two version of freeRTOS 7.3 and 10.0. 7.3 work but not 10.0. I just end up with use v7.3 for now.