Issue with Consecutive USB Transmissions in EXTI Callback
Hello ST Community,
I am currently working on a project using an STM32 microcontroller, where I have implemented a feature to transmit the current date and time over USB when a user button is pressed. The USB transmission is handled using the CDC class.
In my code, when the user button is pressed, an EXTI callback function (HAL_GPIO_EXTI_Callback) is triggered. This function reads the current time and date from the RTC and then sends two separate messages over USB using the CDC_Transmit_FS function.
Here is the relevant part of my code:

The problem I am encountering is that only the first message (containing the current time) is transmitted successfully. The second message (containing the current date) does not get transmitted.
I suspect that this issue might be related to the state of the USB CDC interface, potentially being busy when trying to send the second message. However, I am not entirely sure how to handle this properly.
Could someone please help me understand why the second message is not being transmitted and how I can ensure both messages are sent successfully?
Thank you for your assistance!

