Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Good day devs, I tried integrating a SIM800 module with FreeRTOS for a small start up. I plan to use HAL_UART functions with a timeout mechanism for UART communication, but I’m concerned about later on interference with the FreeRTOS scheduler. Please and please I need guidance on implementing the timeout functionality without disrupting the scheduler.
I’m facing issues reading data from the SIM800 module. But I’ve declared a buffer and attempted to print its contents using `printf(ReadBuffer)`, nothing is displayed. How can I correctly read and process the received data?
I don’t know if I should use TCP/IP to connect the SIM800 module to a server.
// Setting up my UART data reading
HAL_UART_Receive_IT(&huart1, ReadBuffer, sizeof(ReadBuffer));
// Printing my received data
printf("Received Data: %sn", ReadBuffer);
I suggest you should Try and use the xTimerCreate function to make a timer with a specific period ,you can use 1000 milliseconds for a 1 second timeout . Later you can now set the timer to call a callback function when timeout happens.
Use xTimerStart to start your time . @ifreakio
Thanks for the suggestion tho, but I am also thinking about the implementation. What if I set up the xTimer to handle the timeout, but the UART interrupt completes successfully before the timer expires? How should I handle stopping or resetting the timer in that case to avoid unnecessary callbacks or resource usage? @ucgee
@Middleware & OS
CONTRIBUTE TO THIS THREAD