• Simple Add-ons lightning talk at supercon

    09/26/2025 at 13:57 0 comments

    Thought it would be nice to have a separate video of my lightning talk at supercon about simple add-ons, so it's easier to find and point at.

  • Playing with the I2C SAO Petal for Supercon 8

    11/07/2024 at 23:55 0 comments

    My first tripup was that GPIO1 was not soldered on the badge, glad I caught it!

    I also soldered an LED leg as a jumper for the programming pin on the SAO to be always connected to GPIO1.

     It seems like there's a little issue with the Supercon image and getting the programmer to run, but the programmer works with the vanilla RP2040 PICOW image. These are the files that are on the image to start with.

    Followed by this file tree, when I upload the programmer onto the badge as well.

    I create another file and copy in the example that is written in flash_ch32v003.py - note here that I have to comment out the "or" in between the example.

    >>> %Run -c $EDITOR_CONTENT
    Traceback (most recent call last):
      File "<stdin>", line 2, in <module>
      File "flash_ch32v003.py", line 35, in __init__
    ValueError: StateMachine claimed by external resource
    >>> 

    This is something that others have noticed before - by changing the used statemachine from 4 to 3, this error went away. When I run the program now, I get this output, but it is still blinking, instead of putting out touch values. 

    >>> %Run -c $EDITOR_CONTENT
    Time spent: 545482
    0x0 0x0
    0x1 0x0
    0x2 0x0
    0x3 0x0
    >>> 
    

    With the vanilla Micropython from https://micropython.org/download/RPI_PICO/ I also just copy the files onto the badge and run the code from REPL and it works. Therefore I doubt that it is a hardware issue and must have something to do with the supercon image. 


    It seems like just changing the state machine number in the "StateMachine" function is not enough, you also have to change the "unavoidable bit-twiddling" bit, If you want to use a statemachine smaller than zero, then you have to change the PI1_BASE value to PI0_BASE and add the correct state machine SM1_EXECCTRL. It seems like I2C on the PICO W leads to a different state machine being used, which then breaks the flasher.

    Here's my pull request on github with the changes:

    https://github.com/hexagon5un/pico_ch32v003_prog/pull/3/commits/2969a4c86f1d7a7f7e61d8a69b40ba99e09288a0

  • getting the pico usb host example compiled correctly

    12/01/2022 at 19:51 2 comments

    I couldn't find the picoprobe with openOCD until I flashed it with a pre compiled picoprobe.uf2 file instead of compiling it myself. If it works, it works - I guess.

    found the related issue where I got the working picoprobe.uf2 got from: https://github.com/raspberrypi/openocd/issues/71
    Basically pointing to this site where you can download the probe firmware:

    https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html#debugging-using-another-raspberry-pi-pico


    So apparently there's a tinyusb bug that will break the usb hid example and throw something like this at you:

    assertion "ep->active" failed: file "~/Projects/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040/hcd_rp2040.c", line 164, function: hw_trans_complete

    This has something to do with the debug mode and you need a flag to run cmake first before compiling:

    PICO_SDK_PATH=~/Projects/pico/pico-sdk cmake .. -DCMAKE_BUILD_TYPE=Release
    make -j8

    I have yet to find out what the difference between -j8 and -j4 means but hey, that up their worked.

    link that helped: https://github.com/raspberrypi/pico-sdk/issues/649

    video that helped: