Other Parts Discussed in Thread: SYSCONFIG, UNIFLASH
We recently want to use SWD pins as alternate function. Ans we are using the sysconfig to generate the initialization code. However, we had some issue on that. The SWD no longer available after download the program which contains this change.
I see that SYSCFG_DL_DEBUG_init() is after the SYSCFG_DL_GPIO_init(). However, in the RM:
To disable SWD functionality, set the DISABLE bit in the SWDCFG register in SYSCTL along with the KEY. Then configure IOMUX for the desired functionality.
Once the SWD pin functions are disabled, they can only be re-enabled by triggering a POR.
Is this a sysconfig tool bug?
I tried to run our application with generated code. Yes, the SWD port is disabled, now we cannot Flash it anymore. However, question is:
I saw the RM that SWD will re-enable after a POR (NRST >1s). Why neither online Uniflash nor local DSLite tool can reset the target properly and attach the device? I always received the DAP_0 fail message (and ask me if I want to force reset the board, but keep failing).
Our program is run on application partition, so a bootloader is present. The bootloader will load the APP ~1s later, so I think the debugger has time to enter debug mode and skip the APP FW setting.
Currently, we have to OTA our software to a FW that don't disable the SWD. Then power-cycle the device, the SWD is recovered.