Hello,
I have a custom board with STM32F405 using PlatformIO with STM32Duino core (not maple).
I have several pin conflicts. I need to use PB0, PB5, PB1, PA5 as analog inputs. However, I have a SerialUSB (USBC) which is setting them up as USB_OTG_HS. Which doesn't let me read those pins as analog inputs.
How can I get those pins working correctly? I would appreciate any ideas or help.
Custom Board using STM32Duino | SerialUSB + PB0
-
- Posts: 3
- Joined: Tue Aug 29, 2023 4:21 pm
Re: Custom Board using STM32Duino | SerialUSB + PB0
if I'm not wrong, usb is normally at PA11 USB DM, PA12 USB DP
and that to be 'safe', ADCs are normally used at PA0-PA7
and that to be 'safe', ADCs are normally used at PA0-PA7
-
- Posts: 3
- Joined: Tue Aug 29, 2023 4:21 pm
Re: Custom Board using STM32Duino | SerialUSB + PB0
Yea, PA11 is USB DP and PA12 is USB DM.
Per the datasheet, PB0 for example has an alternate function OTG_HS_ULPI_D1 and its additional function ADC12.
For some reason PB0 is getting assigned to OTG_HS_ULP1_D1 when USB should only take up A11, 12.
Per the datasheet, PB0 for example has an alternate function OTG_HS_ULPI_D1 and its additional function ADC12.
For some reason PB0 is getting assigned to OTG_HS_ULP1_D1 when USB should only take up A11, 12.
Re: Custom Board using STM32Duino | SerialUSB + PB0
I guess you use the generic. Simply redefine the pinmap USB array to only configure the 2 pins PA11 and PA12. See the wiki to known how to do this.