diff --git a/src/setup.cpp b/src/setup.cpp index 25b00c8..68492ba 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -85,6 +85,7 @@ uint32_t timestamp; #ifndef UNIT_TEST #include +#include static inline void timestamp_inc(struct k_timer *timer_id) { @@ -104,6 +105,11 @@ void setup() */ void *temp = k_malloc(4); k_free(temp); + +#ifdef CONFIG_SOC_SERIES_STM32G4X + // disable 5k pull-down required for USB-C PD on PB4 and PB6 so that they can be used as inputs + PWR->CR3 |= PWR_CR3_UCPD_DBDIS; +#endif } #endif