Skip to main content

Module firmware

Module firmware 

Source
Expand description

Putting firmware into the two microcontrollers the concentrator runs.

The chip does not receive anything on its own. Two microcontrollers inside it do the work, and both start empty: the gain control one sets the front end gains, and the arbiter shares the radios between the receivers. Each holds eight kilobytes, written over the same SPI bus as everything else, into a memory window the host takes control of first.

The order matters and the chip does not enforce it. The host holds the microcontroller in reset, claims its memory, writes, reads the same bytes back and compares them, releases it, and only then asks whether the parity check passed. Skipping the read-back means a bad bus looks like a working one until the concentrator quietly hears nothing.

The firmware images themselves are not in this crate. They belong to Semtech and are carried by the caller, so a Load says what to do with the bytes rather than holding them. The reference implementation distributes them as C source rather than as files of bytes, so read_source reads that form directly and a gateway points at the file it already has.

Enums§

Load
A step in loading firmware.
LoadError
Why firmware did not load.
Mcu
Which microcontroller is being loaded.

Constants§

AGC_MEMORY
Where the gain control firmware is written.
ARB_MEMORY
Where the arbiter firmware is written.
FIRMWARE_LEN
How many bytes of firmware each microcontroller holds.

Functions§

check_size
Checks an image before any of it goes out.
compare
Compares what was read back with what was written.
read_source
Reads an image out of the C source the reference implementation carries it in.
steps
The steps that load one microcontroller, in order.