Documentation for “Zerocat Chipflasher” as of Sat, 29 Mar 2025 14:42:30 +0100
Repository:
Version: v2.1.6-0-c57b46eb4
Branch: master

../../firmware2/src/kick2.spin.nointerface.html

Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78
Compiling...
../../firmware2/src/kick2.spin
|-PCB.spin
  |-time.spin
|-ASCII.spin
|-time.spin
|-error.spin
  |-time.spin
Done.
Program size is 916 bytes

______________________________________________________________________________
********************************************************* File starts here ***
Zerocat Chipflasher --- Flash free firmware, kick the Management Engine.

Copyright (C) 2020, 2021, 2022, 2024, 2025  Kai Mertens 

File kick2.spin --- The top object file for this firmware2 project.

This file is part of Zerocat Chipflasher.

See end of file for terms of use.

******************************************************************************


IMPORTANT NOTICE
================


* On PCBv1 aka board-v1, the SPI CE# line is pulled up via trimmer.

    Adjust a reasonable value, not too small.

* On PCBv2.0 aka board-v2.0, the SPI CE# line is pulled up via R23 and R10.

    These resistors are populated with 91 Ohm each, forming a pull-up
    value of 45.5 Ohm on the first series of devices, shipped in 2024 and
    earlier.

    That is too small!

    (On the chip flasher development board, this pull-up is set to
    47.62 Ohm, which works in test setups with hand-made wiring.)

    As a workaround, cut one end of R10 with a pince and twist the
    resistor aside, carefully. The remaining pull-up value is 91 Ohm
    (the value of R23), which should be a reasonable value for most use
    cases.

    In 2025, the PCB will provide sockets for R23 and R10, such that
    this pull-up can be adjusted. However, the formed resistor value
    must not be smaller than 42 Ohm, otherwise the Propeller pins 0 and
    1 will be damaged.

    These equations apply:

                    1                  1         1
        R_pull  =  ---  ,      x  =  -----  +  -----
                    x                 R23       R10

* On PCBv2.1 aka board-v2.1, the SPI CE# line is pulled up via trimmer,
  which is digitally monitored.

    In 2025, the PCBv2.1 candidate for FSF Respect Your Freedom (RYF)
    certification uses R23 and R10 as an offset for the trimmer, to
    protect Propeller pins even if the trimmer would be adjusted to zero.

    These equations apply:

                               1
        R_pull  =  R_trim  +  ---    ,
                               x

        R_trim  =  0..500 (approx.)  ,

                     1         1
             x  =  -----  +  -----
                    R23       R10

    The value of R_pull is displayed in the menu of `kick2-connect`.
    Upon change, the display should be refreshed by user's key input.

    A value of 91 Ohm is still considered as a reasonable value for
    many use cases, however, some targets require an adjustment.




# Object Configuration (set via Makefile)

Tell us which interface to use:

* connect
* flashrom
* terminal
* none


# Interface Description

Object "../../firmware2/src/kick2" Interface:

PUB  kick2

Program:  225 Longs
Variable: 0 Longs


# Loaded Objects

Load PCB configuration object.
Load ASCII object.
Load time object.
Load error object.


# Constants

* DIP Switches A and B: Board Version

    Devkit: open = H, closed straight = L, closed angular = H

    open = H, closed = L

    Board Version  |  SWDIP_B  |  SWDIP_A
    ---------------|-----------|-----------
             V1    |        L  |        L
             V2    |        L  |        H
             V2.1  |        L  |        H_delayed
             V3    |        H  |        L
             V4    |        H  |        H

    On PCBv1, SWDIP_A is connected to GND via resistor.

    On PCBv1, SWDIP_B is not connected but will hopefully read low at start.

    On PCBv2.1, SWDIP_A is connected to an RC network.
    It can be detected by driving SWDIP_A low and then waiting for a low-to-high transition.

* LED Pins
* System Speed
* Basic Timing
* Project's Memory Usage


# Functions

__________
PUB  kick2

 This is the Chipflasher's new firmware, coded in Spin/PASM.
 Retrieve board version from PCB, read SWDIP_A and SWDIP_B:

    Devkit: open = H, closed straight = L, closed angular = H

    open = H, closed = L

    SWDIP_B  |  SWDIP_A     | PCB version   | Return Value
    ---------|--------------|---------------|---------------
          L  |  L           | board-v1      | $01
          L  |  H           | board-v2.0    | $02
          L  |  H_delayed   | board-v2.1    | $12
          H  |  L           | board-v3      | $03
          H  |  H           | board-v4      | $04

    On PCBv1, SWDIP_A is connected to GND via resistor.

    On PCBv1, SWDIP_B is not connected but will hopefully read low at start.

    On PCBv2.1, SWDIP_A is connected to an RC network.
    It can be detected by driving SWDIP_A low and then
    waiting for a low-to-high transition within 10 millseconds.


******************************************************************************
Terms of Use:

Zerocat Chipflasher is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

Zerocat Chipflasher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with Zerocat Chipflasher.  If not, see <http://www.gnu.org/licenses/>.

************************************************************** End of File ***