Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: USB-PD VDM for Apple devices, add debug shell over UART #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

noahwilliamsson
Copy link
Owner

This is an attempt to take advantage of the FUSB302 chip on the YZStudio ZY12PDN USB-PD Trigger to send custom VDM messages to Apple devices. See Asahi Linux docs on USB-PD.

  • solder wires onto the STM32F0 chip's PA2 (USART1_TX) and PA3 (USART1_RX) pins (3.3V I/O)
  • use an USB Type-C breakout board to gain access to the D+/D- or SBU1/SBU2 signals

Building:

sudo apt install -y python3 openocd screen
pio run
pio run -t upload

This is an attempt to take advantage of the FUSB302 chip on the YZStudio ZY12PDN USB-PD Trigger to explore USB-PD VDMs (Vendor Defined Message) on Apple devices.  See [Asahi Linux docs on USB-PD](https://github.com/AsahiLinux/docs/wiki/HW:USB-PD).

- connect the SWD 3.3V pad to pin 1 (3.3V) on the Raspberry Pi
- connect the SWD GND pad to pin 6 (GND) on the Raspberry Pi
- program the STM32F0 via the SWD pads on the back of the ZY12PDN board
- solder wires onto the STM32F0 chip's PA2 (USART1_TX) and PA3 (USART1_RX) pins (3.3V I/O) to gain access to the UART (the screw terminal must be desoldered first)
- connect the PA2 (USART1_TX and PA3 (USART1_RX) wires to the Raspberry Pi's pin 10 (GPIO 15) and pin 8 (GPIO 14) respectively (see https://pinout.xyz)
- use an USB Type-C breakout board to gain access to the D+/D- or SBU1/SBU2 signals since they're not accessible on the ZY12PDN

Quickstart:

    sudo apt install -y openocd python3 python3-serial
    vi platformio.ini    # optionally update upload_protocol for your SWD programmer
    pio run
    pio run -t upload
    miniterm --raw /dev/ttyS0 115200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant