Oliver Rockstedt

Results 77 comments of Oliver Rockstedt
trafficstars

I think you mean the `embedded-hal` crate, but that's not what I was asking. There are several options for HAL implementations targeting an STM32F4 like: - [stm32f4xx-hal](https://github.com/stm32-rs/stm32f4xx-hal) - [stm32-hal](https://github.com/David-OConnor/stm32-hal) -...

Here's some code based on the README using a modification of the [serial example](https://github.com/stm32-rs/stm32f4xx-hal/blob/master/examples/usb-serial-poll.rs). You have to activate the features `stm32f411`, `otg-fs` and `usb_fs` for the `stm32f4xx-hal` crate, of course...

Unfortunately, I don't have the appropriate hardware to run this. Did you activate the `control-buffer-256` feature on the `usb-device` crate? Because not doing so can lead to crashes when the...

> I have just re-tried enabling `control-buffer-256` and the behaviour is the same. Any other suggestion? If the code stalls inside `UsbDeviceBuilder::new()`, there's a good chance that the problem is...

> I have jsut tested and I can confirm this works. Ok, good to know. But the serial device has a much simpler descriptor, so it's not sure whether `usbd-midi`...

There was some issue with STM32F4 devices mentioned on the tracker a while ago, but this can be unrelated: https://github.com/rust-embedded-community/usb-device/issues/112#issuecomment-1545545348

That can be caused by enabling the pullup on the USB D+ line. The host then tries to access the port, but if the clocks aren't 100% correct, then there's...

> I have added a 1.5k pull-up but no change. I am a bit confused, do not understand how is one example working and the other one requires a pull...

What you also can do: remove just the MIDI class part and check if the device then enumerates. If not, there's some deeper problem like the USB clock not running...

> > What you also can do: remove just the MIDI class part and check if the device then enumerates. If not, there's some deeper problem like the USB clock...