Questions and discussions about the software that runs on the TD RF module itself.
disk91
 
Posts: 58
Joined: Thu May 07, 2015 4:30 pm

GPIO Access on TD1204 DB2 - DB3

by disk91 Sun May 24, 2015 9:35 am

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 ?
disk91
 
Posts: 58
Joined: Thu May 07, 2015 4:30 pm

Re: GPIO Access on TD1204 DB2 - DB3

by disk91 Sun May 24, 2015 5:26 pm

Found answer :
GPIO_DbgSWDIOEnable(false);
GPIO_DbgSWDClkEnable(false);

Need to be called first !
User avatar
mstempin
 
Posts: 168
Joined: Thu May 07, 2015 9:24 am

Re: GPIO Access on TD1204 DB2 - DB3

by mstempin Thu Jun 04, 2015 7:38 am

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.
Return to Firmware

Who is online

Users browsing this forum: No registered users and 34 guests