Sharing SERCOM1 with SWD lines in ATSAMD10

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


I'm using ATSAMD10 device and I created a bootloader enabling the UART in PA30 and PA31. Those lines are shared with Debug lines (SWCLK and SWDIO). So in UART_Init() I'm assigning those pins to SERCOM1, and after bootloader is done and jump to the user application, I want to re-assign those pins to the SWD functions. 


For SWCLK it seems Function G is the right assignment, but since SWDIO is not connected to the port, there is no way to re-configure or re-assign this function to have the debug working. It seems hot-plugin detection should happen but this is not happening. According documentation, it seems reset would be necessary for the hot-plugin to be detected, but in my case, the bootloader would run again, re-assigning the lines to the UART. Is there other way to configure SWD lines back without reset?