2020-02-08 02:08 AM
I have a static LCD, a couple of other GPIOs configured as output and SWD which are all working fine. PA12 does not work when I configure it in output mode and i toggle the pin. I have tried using PA11 also with no success. The .ioc file of my project is attached. Thanks.
Solved! Go to Solution.
2020-02-08 03:24 AM
2020-02-08 02:32 AM
> PA12 does not work when I configure it in output mode and i toggle the pin.
Do you do this in debugger? Read out and post all GPIOA registers.
Do you observe *directly* on the pin, e.g. using oscilloscope probe touching the pin?
What is connected to that pin, physically? Is this some kind of a "known good" board such as Nucleo or Disco (in which case make sure you removed all jumpers and solder bridges associated with this pin), or your board?
JW
2020-02-08 02:34 AM
Use debuggr and stop the code while it is running and look at GPIOA registers values.
Possible causes:
2020-02-08 03:05 AM
Thanks. I'm trying to develop a product with the chip... so it is on my PCB design. The pin is connected to an NPN transistor meant to control an active buzzer. I have removed this transistor so I can run a direct check on the GPIO.
I observed the pin directly with an oscilloscope.
Theses are the readings on the GPIOA registers:
When low:
MODER: 0xA9EAACAB
OTYPER: 0x0
OSPEEDR:0xC000000
PUPDR: 0x24000000
IDR: 0x6000
ODR: 0x0
BSRR: 0x0
LCKR: 0x0
AFR[0]: 0x11001110
AFR[1]: 0x10000111
BRR: 0x0
When high:
MODER: 0xA9EAACAB
OTYPER: 0x0
OSPEEDR:0xC000000
PUPDR: 0x24000000
IDR: 0x7000
ODR: 0x1000
BSRR: 0x0
LCKR: 0x0
AFR[0]: 0x11001110
AFR[1]: 0x10000111
BRR: 0x0
2020-02-08 03:09 AM
Thanks.
2020-02-08 03:24 AM
2020-02-08 04:10 AM
This was the cause of the problem because on my board VDD_USB was floating because I thought it powered only the USB. :see_no_evil_monkey:
Thanks so much.