Recently I got USB supported MMDVM_HS_Hat from AliExpress, and it is programmed USB-CDC capable firmware.
I build recent MMDVM_HS firmware and installed, OpenBSD (I don't know about other OSes) cannot recognized MMDVM board like this.
Nov 6 05:48:12 framboise /bsd: ugen1 at uhub9 port 3 "LeafLabs Maple 003" rev 1.00/2.01 addr 4
Nov 6 05:48:13 framboise /bsd: ugen1 detached
Nov 6 05:48:15 framboise /bsd: uhub9: port 3, set config 0 at addr 4 failed
Nov 6 05:48:15 framboise /bsd: uhub9: device problem, disabling port 3
generic_boot20_pc13_long_rst.bin bootloader works fine, but it looks a problem when switching bootloader to MMDVM_HS software.
I used USB analyzer to investigate and I found there is a moment that MMDVM_HS cannot respond from Host(OpenBSD)'s request. Here is the log.
SET_CONFIGURATION is processed by bootloader.
Launched MMDVM_HS disconnects and reconnects USB, and OpenBSD sends GET_DESCRIPTOR(device) request but there is no ACK handshake.
(note: OpenBSD always starts GET_DESCRIPTOR(device) request when USB device
is connected)
Nov 6 06:39:28 framboise /bsd: ugen1 at uhub9 port 3 "LeafLabs Maple 003" rev 1.00/2.01 addr 4
Nov 6 06:39:29 framboise /bsd: ugen1 detached
Nov 6 06:39:31 framboise /bsd: umodem0 at uhub9 port 3 configuration 1 interface 0 "LeafLabs Maple" rev 2.00/2.00 addr 4
Nov 6 06:39:31 framboise /bsd: umodem0: data interface 1, has CM over data, has break
Nov 6 06:39:31 framboise /bsd: umodem0: status change notification available
Nov 6 06:39:31 framboise /bsd: ucom1 at umodem0
I don't know what causes this problem.
But I think there is some misconfiguration of GPIO and mismatch between software and hardware about controlling USB connect/disconnect GPIO.
Recently I got USB supported MMDVM_HS_Hat from AliExpress, and it is programmed USB-CDC capable firmware. I build recent MMDVM_HS firmware and installed, OpenBSD (I don't know about other OSes) cannot recognized MMDVM board like this.
generic_boot20_pc13_long_rst.bin bootloader works fine, but it looks a problem when switching bootloader to MMDVM_HS software. I used USB analyzer to investigate and I found there is a moment that MMDVM_HS cannot respond from Host(OpenBSD)'s request. Here is the log.
SET_CONFIGURATION is processed by bootloader. Launched MMDVM_HS disconnects and reconnects USB, and OpenBSD sends GET_DESCRIPTOR(device) request but there is no ACK handshake. (note: OpenBSD always starts GET_DESCRIPTOR(device) request when USB device is connected)
Simply I tried to get rid of GPIO_Mode_IN_FLOATING setting to GPIO_Pin_11/12 like my repo (see https://github.com/jg1uaa/MMDVM_HS/commit/f8d18f18c383a5d6555f53eb996d7f08833926ef), it works fine.
I don't know what causes this problem. But I think there is some misconfiguration of GPIO and mismatch between software and hardware about controlling USB connect/disconnect GPIO.
usb/usb_serial.cpp in STM32F10x_Lib controls USB connect/disconnect by GPIO PB10 (https://github.com/juribeparada/STM32F10X_Lib/blob/1debc23063f3942608e2bd62d04d5e1249c47fa3/usb/usb_serial.cpp#L50), but is this already used by I2C module? (Used bootloader is enahnced version of LeafLab's Maple board, this uses PB9 to control USB connection).
Is there any good resolution to solve this problem??