2023-01-05 02:35 PM
i had USB Host MSC working on H743 (devE board) , read USB sticks 1...64 GB without problem;
now, after try to make USB Audio Host on second (HS) usb port, which is not running until now (there is no working example by STM - and no plan to do this (!) ) , access to usb stick no more working; and i have no idea, why ...or what i did wrong.
i installed SWV , to see more info, this is coming, when debug level on usb is set :
obviously usb stick is enumerated, can read size and directory, but when read data (16KB) it hang up in some usb BOT loop or USB_busy state.
anybody knows, what i should do now, to get it running again?
+ maybe , howto get audio host running?
Solved! Go to Solution.
2023-01-07 01:43 AM
ok, found problem:
the usb file read is first called in main (worked always), then from DMA callback;
so usb INT needs to have higher priority than this DMA INT;
i set it on same priority , but higher sub prio.
didnt work....
until i set now the DMA INT to next lower priority (1.3 -> 2.1 ) - now ok again.
2023-01-07 01:43 AM
ok, found problem:
the usb file read is first called in main (worked always), then from DMA callback;
so usb INT needs to have higher priority than this DMA INT;
i set it on same priority , but higher sub prio.
didnt work....
until i set now the DMA INT to next lower priority (1.3 -> 2.1 ) - now ok again.
2023-01-07 02:20 PM
Take a note that ST USB stack's APIs cannot be called from non-interrupt context or from interrupts of different priorities without providing an appropriate protection. It's designed by incompetent fools...
Better invest your time in TinyUSB!