Jump to SiLabs: Step 1 - Make a Debug Tool

Design ToolStick BA + DA pin compatible board with C8051F342 chip (with PCB USB connector).

ToolStick Debug Adapter firmware available from Silabs site (as part of USB Debug Adapter Firmware Reset.exe).
Original use C8051F321 chip - but no problem with port to F342 chip.
Only one problem - How to program first adapter ?
I use Arduino compatible board (handmake pcb with single ATmeage168P chip).
Create AVR program for control C2 bus.


Also C# frontend


Download Blink sample to adapter and see results.


Next step - test Debug Adapter firmware on F342 chip.

Link to github
with C# project (with exe file) and Arduino sketch.

13 comment(s) so far

  1. Wow, your code rock, x893!

    I was checking app note from Silabs and scratched my head how to convert the example code to Arduino. www.silabs.com/.../an127.pdf

    I'll study your code and try it in my project. Thank you!

  2. Very interesting!

    Where did You get the info about the extra ID of the silabs devices?

  3. Sorry, found it myself in AN127 1.13...

  4. hello, load your AVR code on a pro-mini board just changed led pin to PB5 (board led) C2 bus remain untouched, mini led blink 5 times so I think all is ok.

    But on PC SW try to connect to usb2serial adapter port (same used to load sketch) and fails with "A device attached to the system is not functioning"

    Any advice?

  5. Hi, check only with FTDI and CP2102 USB adapter. C# code use access to USB via system. Some USB adapters add chars to COMn name so need remove it in host program.

  6. Tested with CP2101 from gsm usb2ttl adapter, will try FTDI later.

    anyway, sniffing traffic, arduino send "C2 Flasher" but nothing comes from PC SW. I am using net 4.0 will try with and old pc and 2.0.

    Thanks for the quick reply.-

  7. HI,

    I just tried this on an Arduino Uno R3 with limited success. I can connect to my C8051F340 Waveshare target, but it fails to get Unique_ID.

    Does your .pde program require a certain MHz crystal on board?

  8. Adding some waiting in the Pulse_C2CLK subroutine seemed to help.

    void Pulse_C2CLK(void)


    C2CK_PORT &= ~C2CK_BIT;

    asm volatile("nop\n\t"); // 62.5 nano seconds on 16MHz

    asm volatile("nop\n\t");

    C2CK_PORT |= C2CK_BIT;

    asm volatile("nop\n\t");

    asm volatile("nop\n\t");


  9. Unique ID was 7D.09

    After Device Erase, it is 00.00, and Silabs tools reports the CPU as unknown.

    Erasing and writing appears to work, but I cannot read anymore.

  10. Erasing and writing probably doesn't work.

    Silabs flash utility report "User Code Erase Error"

  11. Hello guys,

    I'm looking for the C2.Flask.exe file. Can you help me please?

  12. It's in C2.Flash\bin\debug\

    Or if you have the right Visual Studio version you can compile it yourself from the source.

  13. Hi everyone,

    I can't read Unique_ID. I've tried with another chip but there is the same problem. I can read Device_ID and second code but I have problem with third code (Unique_ID).

    I've changed Pulse_C2CLK function as wrote Anon, but there isn't solution of this problem.

    Any advice?

Post your comment

Thanks for your comments

  • Comment


Subscribe to x893 blog Subscribe to x893 blog