2024-12-26 02:13 AM
Hello,
I'm using the STM32F407 board. I'm trying to implement FreeRTOS on a smart parking system but when using the RFID i need to define SysTick_Handler two times. How can i resolve this problem.
2024-12-26 02:23 AM
Hello @Azizz and welcome to the community,
Need to clarify what do you mean by :
@Azizz wrote:
i need to define SysTick_Handler two times.
Please provide more details about your use case.
2024-12-26 02:25 AM
May be I understood your question.
I think you have a multiple duplication error when compiling the project. But for that you need to share your project so we could have a look at it. Sharing the main.c file is not sufficient.
2024-12-26 02:31 AM
I am using an RC522 library for RFID functionality. When I manually add FreeRTOS to my project, the code reports that the SVC_Handler, SysTick_Handler, and PendSV_Handler functions are defined twice: once in the FreeRTOS port files and again in the stm32f4xx_it.c file. However, if I remove these functions from stm32f4xx_it.c, the RFID functionality stops working.
2024-12-26 02:34 AM
2024-12-26 03:00 AM
I'm not expert of RFID interface.
To me when you enable FreeRTOS you need to select another time base for HAL because FreeRTOs is using Systick.
In CubeMx, select another time base source instead of Systick. Example select TIM6:
2024-12-26 03:11 AM
same problem the code reports that the SVC_Handler, SysTick_Handler, and PendSV_Handler functions are defined twice(when i select TIM6 as time base for HAL).
2024-12-26 03:20 AM
Sorry I didn't understand how you did add FreeRTOS in your project? manually? or over CubeMx?
You need to add FreeRTOS in CubeMx:
Don't add FreeRTOS manually.
You need to configure FreeRTOS, tasks, etc.. in this menu:
And as stated previously, don't forget to set select another time base source instead of Systick.
2024-12-26 03:24 AM
2024-12-26 03:28 AM - edited 2024-12-26 03:46 AM
I recommend to add it from CubeMx. Otherwise it will be more difficult to adapt it with CubeMx for many reasons and I don't recommend adding it manually. Or tell your professor to help you on that.