Editor Version ×
recommended

Pro Edition

free

Brand new interactions and interfaces

Smooth support for design sizes of over 3W

devices or 10W pads

More rigorous design constraints, more

standardized processes

For enterprises, more professional users

Std Edition

Easy to use and quick to get started

The process supports design scales of 300

devices or 1000 pads

Supports simple circuit simulation

For students, teachers, creators

Ongoing

STD CH552E picoDAP SWD Programmer

CH552E picoDAP SWD Programmer

Project tags

License

CC-BY-SA 3.0

License: CC-BY-SA 3.0

Mode:

Mode

Editors' pick

Editors' pick

  • 965
  • 0
  • 1
Update time: 2024-02-01 19:41:52
Creation time: 2022-12-03 18:15:24
Description

Description

# picoDAP The CH552E-based picoDAP is a CMSIS-DAP compliant debugging probe with SWD protocol support. It can be used to program Microchip SAM and other ARM-based microcontrollers. The Firmware is based on [Ralph Doncaster's](https://github.com/nerdralph/ch554_sdcc/tree/master/examples/CMSIS_DAP) DAPLink-implementation for CH55x microcontrollers and Deqing Sun's [CH55xduino](https://github.com/DeqingSun/ch55xduino) port. ![picoDAP_pic1.jpg](https://raw.githubusercontent.com/wagiminator/CH552-picoDAP/main/documentation/picoDAP_pic1.jpg) # CMSIS-DAP CMSIS-DAP provides a standardized way to access the Coresight Debug Access Port (DAP) of an ARM Cortex microcontroller via USB. CMSIS-DAP is generally implemented as an on-board interface chip, providing direct USB connection from a development board to a debugger running on a host computer on one side, and over JTAG (Joint Test Action Group) or SWD (Serial Wire Debug) to the target device to access the Coresight DAP on the other. As a USB HID compliant device, it typically does not require any drivers for the operating system. For more information refer to the [CMSIS-DAP Handbook](https://os.mbed.com/handbook/CMSIS-DAP). ![CMSIS-DAP.png](https://raw.githubusercontent.com/wagiminator/CH552-picoDAP/main/documentation/picoDAP_CMSIS-DAP.png) # Compiling and Installing Firmware ## Installing Toolchain for CH55x Install the [CH55x Software Development Kit for the SDCC compiler](https://github.com/Blinkinlabs/ch554_sdcc). Follow the instructions on the website. In order for the programming tool to work, Python3 must be installed on your system. Most Linux distributions already include this. Windows users can follow these [instructions](https://www.pythontutorial.net/getting-started/install-python/). In addition pyusb must be installed. On Linux this can be done by running the following commands: ``` sudo apt install python3-pip sudo pip install pyusb ``` ## Installing Drivers for the CH55x Bootloader ### Linux You do not need to install a driver. However, by default Linux will not expose enough permission to upload your code with the USB bootloader. In order to fix this, open a terminal and run the following commands: ``` echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="4348", ATTR{idProduct}=="55e0", MODE="666"' | sudo tee /etc/udev/rules.d/99-ch55x.rules sudo service udev restart ``` ### Windows On Windows you will need the Zadig tool (https://zadig.akeo.ie/) to install the correct driver. Click "Options" and "List All Devices" to select the USB module, then install the libusb-win32 driver. ## Entering CH55x Bootloader Mode A brand new chip starts automatically in bootloader mode as soon as it is connected to the PC via USB. Once firmware has been uploaded, the bootloader must be started manually for new uploads. To do this, the board must first be disconnected from the USB port and all voltage sources. Now press the BOOT button and keep it pressed while reconnecting the board to the USB port of your PC. The chip now starts again in bootloader mode, the BOOT button can be released and new firmware can be uploaded within the next couple of seconds. ## Compiling and Uploading Firmware Open a terminal and navigate to the folder with the makefile. Run ```make flash``` to compile and upload the firmware. If you don't want to compile the firmware yourself, you can also upload the precompiled binary. To do this, just run ```python3 ./tools/chprog.py picodap.bin```. # Operating Instructions Connect the picoDAP to the target board via the 10-pin connector or the pin header (RST / DIO / CLK / GND). Make sure the target board is powered. You can supply power via the 3V3 pin (max 150 mA) or the 5V pin (max 400 mA). Plug the SWD Programmer Stick into a USB port on your PC. Since it is recognized as a Human Interface Device (HID), no driver installation is required. The SWD Programmer Stick should work with any debugging software that supports CMSIS-DAP (e.g. [OpenOCD](http://openocd.org/)). Of course, it also works with the [SAMD DevBoards](https://github.com/wagiminator/SAMD-Development-Boards) in the Arduino IDE (Tools -> Programmer -> Generic CMSIS-DAP). # References, Links and Notes 1. [Project Files \(Github\)](https://github.com/wagiminator/CH552-picoDAP) 2. [DAPLink](https://github.com/ARMmbed/DAPLink) 3. [CH55xduino](https://github.com/DeqingSun/ch55xduino) 4. [Ralph Doncaster's Implementation](https://github.com/nerdralph/ch554_sdcc/tree/master/examples/CMSIS_DAP) 5. [CMSIS-DAP Handbook](https://os.mbed.com/handbook/CMSIS-DAP) 6. [SDCC Compiler](https://sdcc.sourceforge.net/) 7. [CH55x SDK for SDCC](https://github.com/Blinkinlabs/ch554_sdcc) 8. [OpenOCD](http://openocd.org/) 9. [SAMD DevBoards](https://github.com/wagiminator/SAMD-Development-Boards) ![picoDAP_pic2.jpg](https://raw.githubusercontent.com/wagiminator/CH552-picoDAP/main/documentation/picoDAP_pic2.jpg) # License ![license.png](https://i.creativecommons.org/l/by-sa/3.0/88x31.png) This work is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License. (http://creativecommons.org/licenses/by-sa/3.0/)
Design Drawing

Design Drawing

schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
ID Name Designator Footprint Quantity Supplier spiceSymbolName link
1 100n C1 C_0603 1 LCSC Cap_0603_EU C14663
2 1u C2,C3 C_0603 2 LCSC Cap_0603_EU C15849
3 SWD-Connector H1 SWD-CONNECTOR-SQUARE 1 LCSC SWD-Connector C343640
4 SWD H2 210S-6X1/2.54 1 LCSC HDR-M-2.54_1x6 C190819
5 PRG LED1 LED0603 1 LCSC LED-0603-RED C2286
6 PWR LED2 LED0603 1 LCSC LED-0603-GREEN C72043
7 1k R1,R2 0603 2 LCSC Res_0603(1/10W)_EU C21190
8 10k R3 0603 1 LCSC Res_0603(1/10W)_EU C25804
9 100R R4,R5,R6 0603 3 LCSC Res_0603(1/10W)_EU C22775
10 BOOT SW1 SW-SMD_L4.0-W2.9-LS5.0 1 LCSC SW-4.0x2.9 C7428691
11 CH552E U1 MSOP-10 1 LCSC CH552E C967938
12 XC6206P332MR U2 SOT-23-3_W 1 LCSC XC6206P332MR C5446 Yes
13 USB-Plug USB1 USB-M-48 1 LCSC USB-Plug C112454

Unfold

Project Attachments

Project Attachments

Empty
Project Members

Project Members

Target complaint
Related Projects
Change a batch
Loading...

Comment

Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn