CN / EN
Doc Feedback
Thanks for your interest, welcome to contact us.
Thanks for your feedback

SWD Interface

GR5xx SoCs provide an SWD interface. Disabling the SWD interface can prevent unauthorized external access.

In security mode, when users download security mode control files in which SWD interface disabled to eFuse, the SWD interface will be disabled. Users can disable the SWD interface when generating the file to be downloaded to eFuse (Mode_control.bin) with GProgrammer. When SWD is disabled, users can also upgrade firmware through DFU. Alternatively, users can also enable the SWD interface with the corresponding register by programming the local application.

Note:

Because eFuse is one-time programmable, once the SWD interface is disabled by programming the security mode control file, the disablement is unrecoverable.

Register

Table 3 SWD control register
Bits Field Name RW Reset Description
SoC series: GR551x

Register address: 0xA000C504

17

SWD_ENABLE

RW

0x0

Enable SWD debugging.

Value:

  • 0x0: Disable
  • 0x1: Enable
Other SoC series

Register address: 0x4000A004

8

SWD_ENABLE

RW

0x0

Enable SWD debugging.

Value:

  • 0x0: Disable
  • 0x1: Enable

APIs

Table 4 sys_swd_enable
Function Prototype

void sys_swd_enable(void)

Function Description

Enable SWD interface.

Input Parameter

None

Return Value

None

Remarks
Table 5 sys_swd_disable
Function Prototype

void sys_swd_disable(void)

Function Description

Disable SWD interface.

Input Parameter

None

Return Value

None

Remarks

Scan to follow

Open WeChat, use "Scan" to follow.