Skip to content
Snippets Groups Projects
  • Jakub Vaněk's avatar
    a02ed0f7
    Add a new MicroPython board definition with slower flash clocks · a02ed0f7
    Jakub Vaněk authored
    In the production run of OpenCube, it was discovered that some of the
    flash chips (3-4 bricks from 25) fail to run at the default 66 MHz.
    It was separately tested that at 33 MHz, they work reliably.
    
    To change the clocks, it is necessary to redefine the
    PICO_FLASH_SPI_CLKDIV macro. To achieve that, this commits adds
    a new MicroPython board based on the Pico reference board.
    The PICO_FLASH_SPI_CLKDIV macro is changed via a trick copied from
    the "nullbits Bit-C PRO" MicroPython board -- this board had a
    custom board config header which includes the PICO_FLASH_SPI_CLKDIV
    setting. This setting is now set to 4 to achieve the 33 MHz SPI freq.
    
    However, the way this is done (adding a text-based patch on top of
    a MicroPython submodule) is not sustainable in the long-term.
    Eventually, this change should be migrated to the MicroPython upstream
    (I don't think they would protest much against us adding basic OpenCube
    support there). The board definition could also be improved by
    specifying the pin names, changing the default pins, etc.
    Add a new MicroPython board definition with slower flash clocks
    Jakub Vaněk authored
    In the production run of OpenCube, it was discovered that some of the
    flash chips (3-4 bricks from 25) fail to run at the default 66 MHz.
    It was separately tested that at 33 MHz, they work reliably.
    
    To change the clocks, it is necessary to redefine the
    PICO_FLASH_SPI_CLKDIV macro. To achieve that, this commits adds
    a new MicroPython board based on the Pico reference board.
    The PICO_FLASH_SPI_CLKDIV macro is changed via a trick copied from
    the "nullbits Bit-C PRO" MicroPython board -- this board had a
    custom board config header which includes the PICO_FLASH_SPI_CLKDIV
    setting. This setting is now set to 4 to achieve the 33 MHz SPI freq.
    
    However, the way this is done (adding a text-based patch on top of
    a MicroPython submodule) is not sustainable in the long-term.
    Eventually, this change should be migrated to the MicroPython upstream
    (I don't think they would protest much against us adding basic OpenCube
    support there). The board definition could also be improved by
    specifying the pin names, changing the default pins, etc.
.gitlab-ci.yml 1.72 KiB