cancel
Showing results for 
Search instead for 
Did you mean: 

Repurposing Discovery GPIOA PA10,PA13,PA14,PA15 as Outputs

addac
Associate
Posted on February 26, 2015 at 00:06

Hello,

I'm working on a STM32F407VG Discovery board and seem to have hit a brick wall trying to set GPIOA typical usb pins (PA10,PA13,PA14,PA15) as outputs to light up leds.

I've tried initializing the pins the normal way but they seem to get stuck on the usb communication, without any usb cable plugged in and powering the discovery board externally the behaviour changes but still they don't respond to any code set/reset bit.

Been reading online but still didn't found any solution.

I already repurposed some some special pins for inputs (ex: PB9,PD5) for these some resistors needed to be removed as they are tied to specific peripherics.

May this be the case for the pins i'm trying to use?

i tried finding this info on the board manual but doesn't look like i need to.

reading through other threads also tried GPIOA -> MODER to reset pins but still no luck.

also noticed the LCKK register but it seems to be disabled so no pins seem to be locked for reconfigurations.

Not posting any code as i believe this is not code related as all other pins on GPIOA work as expected.

Any hint is much appreciated!

all the very best

andre

2 REPLIES 2
Posted on February 26, 2015 at 00:34

Well PA13/PA14 relate to the SWD debug interface, so you'll need to disconnect the ST-LINK, and you'll lose debug functionality.

PA15 should be free.

Beyond that I'd expect PA13,14,15 to work as GPIO without issues.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
addac
Associate
Posted on February 26, 2015 at 04:05

Thanks a lot Clive,

Seems like i lost a day looking at the wrong side of things, with your reply it made me sure my code and the board should be working, turns out that i was sending thoses lines through through a buffer ic that had a bad solder joint at it's power gnd pin, so all issues i was experiencing was due to that floating gnd.

After this sorted i was happy to see that you don't even need to unplug the usb cable for it to work, you're right that no debug is possible (wasn't expecting it to) and of course the dev software breaks before getting into the debug stating ''Remote communication error. Target disconnected.: No error.''

After this have to full erase the board to be able to upload again but i was expecting that as well.

So all is well, thanks a lot!

all the very best

andre