2023-10-19 09:10 AM
Hi. I have a project using the USB_HID class, and the device sends HID reports just fine, until I enable RTC and recompile.
When I enable RTC, without any other changes, I lose my USB event callbacks: HAL_PCD_SuspendCallback and HAL_PCD_ResumeCallback.
I thought it may be related to something like this: https://community.st.com/t5/stm32-mcus-products/problem-with-example-usb-code-and-rtc/m-p/491974
Has anybody succeeded in keeping both USB and RTC functioning?
Solved! Go to Solution.
2023-10-19 09:43 AM
The solution was declaring my semaphores before initializing the peripherals, because the callbacks were firing at boot before semaphores were ready.
2023-10-19 09:43 AM
The solution was declaring my semaphores before initializing the peripherals, because the callbacks were firing at boot before semaphores were ready.