We are able to use the P0_7/P0_6 defaults with the the UART sample program. But upon swithcing RX or TX to P0_2, we get nothing. Can P0_2 be used for RX or TX? Am I missing a non-obvious configuration? Thank you.
Device:
We are able to use the P0_7/P0_6 defaults with the the UART sample program. But upon swithcing RX or TX to P0_2, we get nothing. Can P0_2 be used for RX or TX? Am I missing a non-obvious configuration? Thank you.
I can not get P0_2 to act as a standard digital output GPIO either.
Hi lzerman,
Since you are using the TINY module, the P0_2 and P0_10 are used for the Serial Wire Debug (SWD) Interface. If the SWD interface is not required, then P0_2 and P0_10 can be used as GPIO. You should also configure both of them in your software.
You should also remove the jumper from the JTAG position in the J1 header in case you are using the Pro-DK.
Then please also check if the P02_MODE_REG is configured properly.
Thanks, PM_Dialog
I'm having the same issue. After the application has booted, I would like to repurpose P0_2 and P0_10 as GPIO. I believe I have taken all of the necessary steps but am unable to drive either P0_2 or P0_10 high.
Please see the above snippet of the configuration steps. Am I missing something?
The semi-solution is to set the SYS_CTRL_REG[DEBUGGER_ENABLE] = 0;
8:7
R/W
DEBUGGER_ENAB LE
Enable the debugger. This bit is set by the booter according to the OTP header. If not set, the SWDIO and SW_CLK can be used as gpio ports.
0x0: no debugger enabled.
0x1: SW_CLK = P0[2], SW_DIO=P0[5] 0x2: SW_CLK = P0[2], SW_DIO=P0[1] 0x3: SW_CLK = P0[2], SW_DIO=P0[10]
WARNING!!! Setting that bit will make the chip no longer programmable via JTAG!!! It appears like it “Bricks” the chip. In reality you can still program via UART. To un-brick the chip I wrote a batch file to restore stuff back to normal, so it works with JTAG again, but you lose the use of P0_2 again. We are going to redesign our custom boars not to use the P0_2 in that way. I wish this was documented somewhere and not killing houses of developers (mine and your) time.
@c:\diasemi\smartsnippetsStudio2.0.14\Toolbox\SmartSnippetsToolbox.exe -type booter -chip DA14531 -com_port 6 -uart P0_5 -file "C:\Users\Leona\Documents\DA145xx_SDK\6.0.14.1114\config\toolbox_resources\DA1453x\common\flash_programmer.bin"
THIS KILLED HOURS OF OUR TIME!!!
Thanks for the explanation, Izerman. Would you mind sharing your batch file? That may prove to be a valuable resource to others who face the same situation.
The commandline at the bottom of my post is the batch file. It is a one-liner.