2023-11-06 03:12 AM
I am using PB6 as a GPIO input with a pull-up for monitoring a switch to ground. It works properly when not debugging but has some kind of signal on it when debugging that prevents proper operation. Note: I am using the STLINK-V3SET debugger.
Is there a way that I can disable whatever is causing this?
Solved! Go to Solution.
2023-11-06 07:59 AM
2023-11-06 03:40 AM
Check pin configuration and involvement with UCPD and pull down. Check Data Sheet. No specific involvement with debugger unless it changes RCC or GPIO registers.
2023-11-06 04:44 AM
Thank you Tesla,
I'm not sure what you mean. I am using USB in the project; could it be related to this? I notice that one of the PB6 pin options is the USART1_TX pin. I see in a design from ST that that signal (from PA9) is connected to the 14-pin JTAG connector pin 14. Is it possible that the STM32G474RB3 uses this pin while debugging?
2023-11-06 07:59 AM
Tesla meant this.
JW
2023-11-06 08:04 AM
Thanks again waclawek.jan. I'll do some more research.
2023-11-06 03:12 PM
I was able to solve the PB6 issue by forcing PA9 and PA10 to be initialized as low outputs or by setting the UCPD1_DBDIS bit in the PWR_CR3 register. The explanation is in footnote 6 of pin definition table (Table 12) in the STM32G474xB datasheet (page 72). I appreciate all of your help and that of the other contributors on this forum.