2022-12-15 02:30 AM
Hello,
We are currently evaluating the STM32L073 series in terms of the possibility to configure the USB device as either:
In the STM32 studio I have noticed initially that in theory there is the possibility to define from 1 to 255 interfaces?
But then when set the USBD_MAX_NUM_CONFIGURATION and USBD_MAX_NUM_INTERFACES to 2, I had no way to configure more than 1 interface in the software GUI. I right now don't have the hardware to check that physically.
Are multiple USB interfaces possible for this one? I would appreciate all help.
2023-01-09 12:49 AM
Hi @gbm , thanks for the answer.
Sorry, I don't really dig the approach based on interrupts. In modern firmware it should be handled elsewhere, not in the interrupt routine. I.e, doing this in the ISR you need to access the flash in a blocking way. Otherwise the SPI can be used with DMA, and so on.
2023-01-09 02:40 AM
In real modern firmware there is no "elsewhere", just the interrupts. :)
That's why in modern MCUs we have multilevel interrupt preemption.
2023-01-09 02:42 AM
What I meant here is to handle this outside the interrupt routine- i.e., the main loop if there is no RTOS or in a thread if there is. Using multilevel interrupt preemption is not really cross platform, but that's a different story.