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) .
It would be user friendly if the PLECS coder sets this bit directly when the PB6 is used as digital input.
Best regards,
Georg