Page 1 of 1

GPIO Access on TD1204 DB2 - DB3

Posted: Sun May 24, 2015 9:35 am
by disk91
Hello,

I have a problem to acces DB2 / DB3 GPIO on TD1204

GPIO_PinModeSet(DB2_PORT, DB2_BIT, gpioModePushPull, 1);
GPIO_PinModeSet(DB3_PORT, DB3_BIT, gpioModePushPull, 1);
...
GPIO_PinOutClear(DB2_PORT, DB2_BIT);
...
GPIO_PinOutSet(DB2_PORT, DB2_BIT);

The DB2 / DB3 state does not change, it stays low for one and high for the other
Any Idea ?

Re: GPIO Access on TD1204 DB2 - DB3

Posted: Sun May 24, 2015 5:26 pm
by disk91
Found answer :
GPIO_DbgSWDIOEnable(false);
GPIO_DbgSWDClkEnable(false);

Need to be called first !

Re: GPIO Access on TD1204 DB2 - DB3

Posted: Thu Jun 04, 2015 7:38 am
by mstempin
Exactly, SWD is multiplexed on DB2/DB3 and is enabled by default in order to be able to debug/flash the MCU.

If you disable SWD on these pins using these functions, I suggest that you add a short timeout delay before doing so in order to be able to access this feature upon reset.