This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Implementing SWD over a Type A to C USB cable

Hi,

I want to implement SWD (and potentially UART lines) over a type A to C USB cable to talk to the NRF52832 on our board.

Currently, we only want to sink power only with no USB data. We also don't need to pass USB spec, as we are just using the receptacle for nice ID.

Does anyone have any idea of what 5-6 lines would be safe to pass through SWD and UART lines? I was thinking to use the SBU lines plus D+/D- (maybe even the SS Tx lines on the UFP side) but I am not sure how it would work if they plug it into a computer port.

Thanks!

Parents
  • Which pins to choose for Debug Accessory Mode? Any SWD standard?

    The external device test system signals to the target system to enter debug accessory mode via CC1 and CC2 both being pulled down with an Rn resistor value or pulled up as Rp resistor value from the test plug (Rp and Rn specified in Type-C spec).

    After entering debug accessory mode, optional orientation detection via the CC1 and CC2 is done via setting CC1 as a pullup of Rd resistance and CC2 pulled to ground via Ra resistance (From the test system type-c plug). While optional, orientation detection is required if you want usb power delivery communication to be functional.

    In this mode, all digital circuits are disconnected from the connector, and 14 underlined pins can be used to expose debug related signals (e.g. JTAG interface). USB IF requires for certification that security and privacy consideration and precaution has been taken and that the user has actually requested that debug test mode be performed.

    GND TX1+ TX1− VBUS CC1 D+ D− SBU1 VBUS RX2− RX2+ GND
    GND RX1+ RX1− VBUS SBU2 D− D+ CC2 VBUS TX2− TX2+ GND

    If you don't care about power delivery communication, but still requires flippability of the type-c cable, your test plug will need to be arrange as below. With CC1 and CC2 both being pulled down with an Rn resistor value or pulled up as Rp resistor value from the test plug.

    GND TS1 TS2 VBUS CC1 TS6 TS7 TS5 VBUS TS4 TS3 GND
    GND TS3 TS4 VBUS TS5 TS7 TS6 CC2 VBUS TS2 TS1 GND

    This mirroring of test signals will provide you with 7 test signals for your usage instead of 14, but with the benefit of minimising extra parts count for orientation detection.

    en.wikipedia.org/.../USB-C

  • Just a side node. To void a switch interface the cable connection could act as a switch. That would, in my opinion make a smoother user experience, if only one switch is needed. Compared to opening the shell and pushing some tiny button. One scenario would be, to switch between beacon mode and slave/master mode, set on a timer. To program the nrf52 a SWD to USB-C (DAM) converter would come in handy. From what i gather, the CC1 and CC2 pins must be pulled up with resistor values depending og the case. The only downside, as of now, is the cost. But then again, the project will be futuristic and open. To use the cable-switch approach is likely a smart choice, if the chip is running on a rechargeable power source. Just saying.  

Reply
  • Just a side node. To void a switch interface the cable connection could act as a switch. That would, in my opinion make a smoother user experience, if only one switch is needed. Compared to opening the shell and pushing some tiny button. One scenario would be, to switch between beacon mode and slave/master mode, set on a timer. To program the nrf52 a SWD to USB-C (DAM) converter would come in handy. From what i gather, the CC1 and CC2 pins must be pulled up with resistor values depending og the case. The only downside, as of now, is the cost. But then again, the project will be futuristic and open. To use the cable-switch approach is likely a smart choice, if the chip is running on a rechargeable power source. Just saying.  

Children
No Data
Related