Im trying to implement FreeRTOS Cellular library to my development board Atmel SAM4L8 xPlained Pro. As a cellular module im using uBlox SARA-R5, which in my understanding goes hand in hand with the FreeRTOS/FreeRTOS-Cellular-Interface-Reference-ublox-SARA-R4 GitHub repository.
Problem: How to implement ATSAM USART with the CellularCommInterface? Has anyone successfully ported Cellular library to Atmel MCU? Every example I can find is on STM32, which are using HAL_UART functions.
Does Atmel not provide any UART driver for their devices? If yes, you should use that.
Yes, there are asf drivers, but those drivers do not provide same functionalities that HAL_UART drivers do, like completecallback for RX and TX.
Those are callbacks from ISRs for using USART in interrupt driven mode. I took a quick look at this and it seem that ASF also supports interrupt mode. You can take a look at the examples provided there.
Okey, my initial question was pretty wide-ranging. Let’s say that asf UART functions DOES work for my intent, but how do I implement those to the communication interface? Has anyone done this before and if is, could someone send me source.
The comm interface is a set of functions that you supply to the Cellular library. So what you are asking is how do you write an implementation of comm interface using ASF UART functions. For that you will need to read ASF APIs and figure out how can you implement comm interface functions using those - as an example, the
CellularCommInterfaceSend_t function sends a data buffer and you should be able to implement it with uart_tx functions in ASF.