4 posts / 0 new
Last post
jiangnanzhl
Offline
Last seen:4 years 3 days ago
Joined:2016-05-20 10:24
How to use the JTAG Port as GPIO

As stated in data sheet,The P1_4 is the JTAG clock (SWCLK)by default,and the P1_5 is the JTAG data I/O (SWDIO) by default。
They Can also be used as GPIO pins。
How to use the JTAG Port as GPIO?

By the way,Can I use those Pins (SWCLK and SWDIO) as UART_TX and UART_Rx?

Device:
Gongyu_Dialog
Offline
Last seen:13 hours 22 min ago
Joined:2016-04-27 07:07
according the Datasheet, the

根据数据表,可以使用SWDIO销as uart, when the SYS_CTRL_REG[DEBUGGER_ENABLE] bit is NOT set.

jiangnanzhl
Offline
Last seen:4 years 3 days ago
Joined:2016-05-20 10:24
OK, Thanks

OK, Thanks

jiangnanzhl
Offline
Last seen:4 years 3 days ago
Joined:2016-05-20 10:24
您好,首先感谢您的帮助,我在 periph_init

您好,首先感谢您的帮助,我在 periph_init(void) 函数中,增加如下代码,SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 0); 之后,的确可以将SWDO、SWCLK引脚作为GPIO使用。

但是我发现如上设置的代码一旦写入到某个IC外置的flash 芯片后,
那么这个IC就不能再使用Smart Snippets软件中 的JTAG 方式更新 其外置Flash 中的代码。

我怀疑该现象是上述代码中,关闭 IC的debugger 造成的。
请问,有没有什么方法可以重新打开 IC的 debugger 功能?