2024-03-22 05:56 PM - last edited on 2024-04-30 03:57 AM by Amel NASRI
Hi,
I'm working on a project which requires USB MIDI functionality. I looked into a couple of videos where USB MIDI implementation was done on other boards, but when I try to do the same on mine it's not working. I'm using a NUCLEO board (H755ZIQ), I tried checking with both micro USB ports in the board but i'm still getting nothing. In the videos I watched it was achieved by editing the descriptors inside USBDEVICE. This is one of the video that i followed https://www.youtube.com/watch?v=C6jAYpNR1-E&t=990s
What i did so far is
>>Configure USB_OTG_FS as Device only with
>>Activate VBUS = VBUS_Sensing and activate SOF checked (This was already there by default.)
>> Used the default clock setting for the Nucleo board with 64MHz.
>>In middleware settings, I selected USB_DEVICE_M7 and class was set to HID.
>>I replaced the values in “ALIGN_BEGIN static uint8_t USBD_HID_CfgDesc[USB_HID_CONFIG_DESC_SIZ] ALIGN_END “ With the descriptors for MIDI as per the MIDI specifications
>>Then I used the following code in my while(1) loop.
while (USBD_HID, HandleTypeDef) hUsbDeviceFS.pClassData)->state == HID_BUSY)( USBD_HID_SendReport(&hUsbDeviceFS, &midiNoteOn, 4);
HAL_Delay(5001;
while (USBD_HID, HandieTypeDef) hUsbDeviceFS.pClassData)-state == HID_BUSY)U USBD_HID
I tried blinking an LED to see whether the code is getting stuck somewhere but that is not the case. Is there anything that i'm missing since i'm using a different board.
2024-05-02 08:20 AM
Hello,
I would first recommend you running the provided HID application (emulating a mouse) of the cube firmware, to ensure that your hw setup is working fine
Regards