2024-05-02 11:27 AM
Hello!
I have an STM32F405RGT6 MCU with a custom PCB. I have some trouble with my GPIO pins as they only seem to be high.
I am using the STM32CubeIDE software and have configured all GPIOs. I having trouble with PA12 and PA15 in particular. See GPIO Mode and Configuration:
I use pin PA12 (MD1_AIN1) and PA15 (MD1_AIN2) for the choose the direction for a DC motor.
In the "gpio.c" file I have the following code:
As seen both PA12 and PA15 should be RESET = LOW.
Here is the configuration further down in the code:
I have tried writing:
HAL_GPIO_WritePin(GPIOA, MD1_AIN1_Pin|MD1_AIN2_Pin, GPIO_PIN_RESET);
also in the main.c file but did not seem to work.
I measure with my multimeter between ground and MD1_AIN1 3.3VDC and also between ground and MD1_AIN2.
See drawing for motor driver:
Drawing for MCU (under Digital Out):
Does anybody know why there I have constant 3.3VDC over PA12 and PA15?
Thank you.
Solved! Go to Solution.
2024-05-02 12:47 PM
Yes, you need a 2u2 F capacitor on each VCAP, or connect them and use a 4u7 F one
Part will malfunction without them. Should be able to measure around 1.25 V at these pins.
PA15 = JTDI
Does behaviour of pin change if not connected to the debugger / debug pod ?
2024-05-02 11:46 AM
Can you program the part?
What's going on with the VCAP pins?
Sure the part orientation is correct?
Does this persist if you disconnect the motor headers?
Potential conflicts with SWD/JTAG DP
2024-05-02 12:17 PM - edited 2024-05-02 12:20 PM
Hey @Tesla DeLorean.
1. Which part are you referring to? I am able to program the MCU yes, I have tested PB15, which is a button and it works fine.
2. As you can see in the image below I do not use the VCAP pins. Is this necessary?
3. If you mean the MCU orientation, yes it is correct.
4. Yes.
5. Do you mean the Debug Port for SWD/JTAG?
I am using an ST-Link V2 which is connect via SWD.
Here is my debug configuration:
Thank you.
2024-05-02 12:47 PM
Yes, you need a 2u2 F capacitor on each VCAP, or connect them and use a 4u7 F one
Part will malfunction without them. Should be able to measure around 1.25 V at these pins.
PA15 = JTDI
Does behaviour of pin change if not connected to the debugger / debug pod ?
2024-05-04 03:01 PM
Hey @Tesla DeLorean!
I did as you suggested and connected the VCAPs with a 4u7 F capacitor.
This seemed to solve my problem.
Thank you very much for your help!