2025-06-11 6:46 AM - last edited on 2025-06-11 7:10 AM by Andrew Neil
Hi
I need a guidance to use I2C communication protocol with stm32f103c8t6 using CMSIS RTOS v1. Can any one suggest any tutorial or article which can help me out to understand and implement it for my project.
2025-06-11 7:16 AM
Is this basically the same question as here:
2025-06-11 7:24 AM
As said by @Andrew Neil , it's more or less the same question as this post but that one is generic.
I don't think there is a tutorial for that specific use case stm32f103c8t6+CMSIS RTOS v1+I2C.
Start a simple project and proceed step by step:
1- Create a very simple project using stm32f103c8t6+CMSIS RTOS v1 and create a task where you toggle a LED.
2- If all is OK, try communicating with the sensor outside the task I mean before calling the task create.
3- If all is OK, read the sensor inside the task.
2025-06-11 9:11 AM
HAL communication and using RTOS are independent concepts. In simple cases, the combination will simply work as without RTOS.
But, if you use the HAL API from within a task, the RTOS scheduler will influence the timing. If this is not permissible, you may increase the task's priority, switch to interrupt or DMA based communication, or protect your critical code with a critical section etc..
The "Mastering the FreeRTOS™ Real Time Kernel" tutorial explains some useful general concepts: 161204_Mastering_the_FreeRTOS_Real_Time_Kernel-A_Hands-On_Tutorial_Guide.pdf
hth
KnarfB