stm32g0.c: Disable UCPD on boot

The UCPD is not used with Katapult but it can result in unexpected behaviour on certain pins due to the internal pull resistors unless disabled.

Signed-off-by: Luke Harrison looxonline@gmail.com
This commit is contained in:
Luke Harrison authored and Eric Callahan committed 2024-01-29 16:51:47 -05:00
1 parent ec4df2e45a
commit 6a7ca81e4f
1 file changed
+2
+2
View File
@@ -145,6 +145,8 @@ bootloader_request(void)
void
armcm_main(void)
{
// Disable internal pull-down resistors on UCPDx CCx pins
SYSCFG->CFGR1 |= (SYSCFG_CFGR1_UCPD1_STROBE | SYSCFG_CFGR1_UCPD2_STROBE);
SCB->VTOR = (uint32_t)VectorTable;
// Reset clock registers (in case bootloader has changed them)