<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title xmlns="http://www.w3.org/2005/Atom">Dobrica Pavlinušić's random unstructured stuff: CH32V003</title>
  <id xmlns="http://www.w3.org/2005/Atom">https://saturn.ffzg.hr/rot13/</id>
  <link xmlns="http://www.w3.org/2005/Atom" type="text/html" rel="alternate" href="https://saturn.ffzg.hr/rot13/index.cgi?ch32v003"/>
  <link xmlns="http://www.w3.org/2005/Atom" type="application/atom+xml" rel="self" href="https://saturn.ffzg.hr%2C%20saturn.ffzg.hr:443/feed/workspace/rot13?page=ch32v003;type=Atom"/>
  <updated xmlns="http://www.w3.org/2005/Atom">2025-02-23T15:39:04Z</updated>
  <entry xmlns="http://www.w3.org/2005/Atom">
    <title xmlns="http://www.w3.org/2005/Atom">CH32V003</title>
    <link xmlns="http://www.w3.org/2005/Atom" type="text/html" rel="alternate" href="https://saturn.ffzg.hr/rot13/index.cgi?ch32v003"/>
    <content xmlns="http://www.w3.org/2005/Atom" type="html">&lt;div&gt;Creator: Dobrica Pavlinušić&lt;/div&gt;&lt;hr/&gt;&lt;div class="wiki"&gt;
&lt;div class="nlw_phrase"&gt;&lt;table class="wafl_container"&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;div class="wafl_box"&gt;
        
          &lt;div class="wafl_titlebox"&gt;
            &lt;div class="wafl_title"&gt;
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="wafl_items"&gt;
            
              &lt;div class="wiki"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#balccon_2k24_badge"&gt;Dobrica Pavlinušić's random unstructured stuff (BalCCon 2k24 badge)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] BalCCon 2k24 badge} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ch32v003"&gt;Dobrica Pavlinušić's random unstructured stuff (CH32V003)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] CH32V003} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#esp32s2_programmer"&gt;Dobrica Pavlinušić's random unstructured stuff (esp32s2 programmer)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] esp32s2 programmer} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ardulink"&gt;Dobrica Pavlinušić's random unstructured stuff (ardulink)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ardulink} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;
&lt;/div&gt;

            
            
          &lt;/div&gt;
        
      &lt;/div&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;!-- wiki: {toc: }
--&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1 id="balccon_2k24_badge"&gt;BalCCon 2k24 badge&lt;/h1&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://www.youtube.com/watch?v=4waDha2DxK8"&gt;https://www.youtube.com/watch?v=4waDha2DxK8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://ch405-labs.com/mc-0o00/"&gt;https://ch405-labs.com/mc-0o00/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://gitlab.com/ch405labs/badgelife/mcd-0o00/mcd-0o00-hardware-design"&gt;https://gitlab.com/ch405labs/badgelife/mcd-0o00/mcd-0o00-hardware-design&lt;/a&gt;&lt;/p&gt;
&lt;span class="nlw_phrase"&gt;&lt;img alt="MC-0o00-Schema.png" src="https://saturn.ffzg.hr/rot13/index.cgi/MC-0o00-Schema.png?action=attachments_download;page_name=ch32v003;id=20250216085615-0-27503" /&gt;&lt;!-- wiki: {image: MC-=0o00-=Schema.png} --&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1 id="ch32v003"&gt;CH32V003&lt;/h1&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://github.com/cnlohr/ch32v003fun"&gt;https://github.com/cnlohr/ch32v003fun&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="esp32s2_programmer"&gt;esp32s2 programmer&lt;/h2&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://github.com/cnlohr/esp32s2-cookbook/tree/master/ch32v003programmer"&gt;https://github.com/cnlohr/esp32s2-cookbook/tree/master/ch32v003programmer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
flash programmer to esp32s2&lt;/p&gt;
&lt;pre&gt;
dpavlin@nuc:/nuc/Balccon2k24/esp32s2-cookbook/ch32v003programmer$ /nuc/esp8266/esptool/esptool.py --port /dev/ttyUSB2 -b 460800 write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 build/bootloader/bootloader.bin 0x10000 build/usb_sandbox.bin 0x8000 build/partition_table/partition-table.bin
esptool.py v4.7-dev
Serial port /dev/ttyUSB2
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Detecting chip type... ESP32-S2
Chip is ESP32-S2 (revision v0.0)
Features: WiFi, No Embedded Flash, No Embedded PSRAM, ADC and temperature sensor calibration in BLK2 of efuse V1
Crystal is 40MHz
MAC: 7c:df:a1:02:81:de
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00004fff...
Flash will be erased from 0x00010000 to 0x00041fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 13376 bytes to 9327...
Wrote 13376 bytes (9327 compressed) at 0x00001000 in 0.4 seconds (effective 244.8 kbit/s)...
Hash of data verified.
Compressed 201568 bytes to 111748...
Wrote 201568 bytes (111748 compressed) at 0x00010000 in 2.6 seconds (effective 614.4 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 119...
Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.1 seconds (effective 391.6 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
Connect SWIO (Pin D1) on CH32V003 to GPIO6 on the ESP32S2.&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Optionally use 10k pull-up on SWIO.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Optional Clock Synthesizer is on GPIO2 &amp;quot;Multi2&amp;quot; / &amp;quot;M0&amp;quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VCC Output on GPIO11/12 on ESP32S2.&lt;/p&gt;
&lt;p&gt;
hmm... doesn't seem to work for me&lt;/p&gt;
&lt;pre&gt;
dpavlin@nuc:/nuc/Balccon2k24/ch32v003fun/minichlink$ ./minichlink -3i
Found ESP32S2-Style Programmer
Interface Setup
Error: Failed to get chip details
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
that's because I didn't turn on switch on badge!&lt;/p&gt;
&lt;pre&gt;
dpavlin@nuc:/nuc/Balccon2k24/ch32v003fun/minichlink$ ./minichlink -i
[Fri Feb 21 14:38:00 2025] usb 3-3.3.4.4: input irq status -75 received
[Fri Feb 21 14:38:00 2025] usb 3-3.3.4.4: input irq status -75 received
[Fri Feb 21 14:38:00 2025] usb 3-3.3.4.4: input irq status -75 received
Found ESP32S2-Style Programmer
[Fri Feb 21 14:38:00 2025] usb 3-3.3.4.4: input irq status -75 received
Interface Setup
USER/RDPR  : e817/5aa5
DATA1/DATA0: ff00/ff00
WRPR1/WRPR0: 00ff/00ff
WRPR3/WRPR2: 00ff/00ff
[Fri Feb 21 14:38:00 2025] usb 3-3.3.4.4: input irq status -75 received
Flash Size: 16 kB
R32_ESIG_UNIID1: 4f29abcd
R32_ESIG_UNIID2: b7cabcd4
R32_ESIG_UNIID3: ffffffff
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
flash&lt;/p&gt;
&lt;pre&gt;
dpavlin@nuc:/nuc/Balccon2k24$ ./minichlink -w functest.bin 0 -b
&lt;/pre&gt;
&lt;br /&gt;&lt;h2 id="ardulink"&gt;ardulink&lt;/h2&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://gitlab.com/BlueSyncLine/arduino-ch32v003-swio"&gt;https://gitlab.com/BlueSyncLine/arduino-ch32v003-swio&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr/&gt;&lt;div&gt;Attachments: MC-0o00-Schema.png&lt;/div&gt;</content>
    <id xmlns="http://www.w3.org/2005/Atom">https://saturn.ffzg.hr/rot13/index.cgi?ch32v003</id>
    <author xmlns="http://www.w3.org/2005/Atom">
      <name xmlns="http://www.w3.org/2005/Atom">Dobrica Pavlinušić</name>
    </author>
    <updated xmlns="http://www.w3.org/2005/Atom">2025-02-23T15:39:04Z</updated>
  </entry>
</feed>
