cancel
Showing results for 
Search instead for 
Did you mean: 

USB HID Device callbacks stop functioning when I add RTC via cube/IOC

ms360
Associate II

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?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ms360
Associate II

The solution was declaring my semaphores before initializing the peripherals, because the callbacks were firing at boot before semaphores were ready. 

View solution in original post

1 REPLY 1
ms360
Associate II

The solution was declaring my semaphores before initializing the peripherals, because the callbacks were firing at boot before semaphores were ready.