Hi,
New to the forum so apologies if I've stomped on any etiquette.
Anyhow, I'm not so new to stm32 but have been firmly sat in the Arduino camp using STM's Arduino core & previously Roger Clarke's libmaple based core.
Because neither of these have a working USB Host HID implementation I decided to take the plunge and try and implement my project using Cube IDE.
Essentially I'm converting USB HID Mouse reports to Amiga quadrature GPIO outputs. All of the code for this is working within cube.
However, I need to accurately shape the quadrature waveform and it seemed to me that using a hardware timer would be the obvious way to achieve this with some accuracy.
As soon as I enable the timer the MC appears to hang (I'm not sufficiently familiar with Cube to use the debugger yet), this observation is based on the fact that I do not see any GPIO changes when mouse input occurs, and the serial debug messages that were being written successfully prior to the timer inclusion also cease.
I've pared the code right back to only include the timer & serial output (ie no USB) and the timer works flawlessly along with output appearing in the serial console - adding a GPIO toggle based upon this timer also results in the expected frequency waveform on the GPIO pin.
My best guess is that I've inadvertently stumbled into some interrupt lock/race condition, but after googling like mad and poring over the 401CC reference I can't see anything obvious.
The board I'm using is a WeAct STM32F401CCU Development board (Pill based layout). It's the older board with boot0/1 jumpers and not the push buttons.
Any help/suggestions would be gratefully accepted.
EDIT - code here ->
https://github.com/BennehBoy/F401_AMIGA_HIDBen