# Unwanted connection between STM32 pins

**URL:** <https://forum.plexim.com/t/unwanted-connection-between-stm32-pins/1661>\
**Category:** STM32\
**Tags:** plecs-coder, stm32\
**Created:** [January 8, 2025, 1:27pm UTC](https://forum.plexim.com/t/unwanted-connection-between-stm32-pins/1661 "2025-01-08T13:27:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HMgeorg](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/hmgeorg/32/2379_2.png) [@HMgeorg](https://forum.plexim.com/u/HMgeorg)\
**Post date:** [January 8, 2025, 1:27pm UTC](https://forum.plexim.com/t/unwanted-connection-between-stm32-pins/1661/1 "2025-01-08T13:27:05Z")

</div>

Hello everyone,

I use the PLECS Coder with the STM32 G474 Nucleo board and am basically very happy with it.  
However, I have encountered a problem with my current project.  
I am using the PB6 as a digital input (pull-up) and the PA9 as an analog input. However, a pull-down (5.1 kOhm) is activated on the PB6 as soon as the ADC measures a voltage above 0.6 V on the PA9. This is due to the use of these pins for USB Type-C / USB Power Delivery.

The pull-down effect can be deactivated if the bit UCPD1\_DBDIS=1 is set in the PWR\_CR3 register.

This is also described in the ST forum ([Solved: STM32G441 GPIO PB4 and PB6 pullup not working - STMicroelectronics Community](https://community.st.com/t5/stm32-mcus-products/stm32g441-gpio-pb4-and-pb6-pullup-not-working/td-p/588489)) .

It would be user friendly if the PLECS coder sets this bit directly when the PB6 is used as digital input.

Best regards,  
Georg

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [January 13, 2025, 6:59pm UTC](https://forum.plexim.com/t/unwanted-connection-between-stm32-pins/1661/2 "2025-01-13T18:59:07Z")

</div>

Hello Georg,

There is a solution to configure the STM32 peripherals directly through the Low Level (LL) and Hardware Abstract Layer (HAL) drivers. I’ll send you the fix via a direct message.

Regards,  
Bryan
