NRSTI (Negated ReSeT Input) does a hardware reset on BM1397 when signal is Low.
CLKI (CLocK Input) pin must have a 25MHz clock signal, it will be propagated to the CLKO (CLocK Output) pin.
BI (Busy Input) signal must be pulled-down in order to let the BM1397 communicate.
Communication with BM1397 is done by UART on its CI (Ccommand Input) pin and RO (Response Output). Default baudrate is 115200 bps. UART has 8 bits of data, no parity, 1 stop bit (usually represented as 115200 8N1).
All commands have a fixed 2 byte preamble: 0x55 0xAA
- TYPE = 1: send Job
- TYPE = 2: send Command
- ALL = 0: send to a single Chip
- ALL = 1: send to all Chips on the Chain
if TYPE == 1:
- CMD = 1: send Job
if TYPE == 2:
- CMD = 0: set Chip Address
- CMD = 1: write Register
- CMD = 2: read Register
- CMD = 3: chain Inactive
Total Frame Length excluding preamble.
Depends on TYPE/CMD, see detailed frames below.
Can be CRC5 or CRC16 depending on TYPE/CMD, see detailed frames below.
All Responses have fixed length : 9 bytes.
All commands have a fixed 2 byte preamble: 0xAA 0x55
- TYPE = 0: respond to a command
- TYPE = 4: respond to a job (nonce)
Depends on TYPE, see detailed frames below.
CRC 5 bits with polynomial 0x05, initial value 0x1F, no reflection, no final XOR of the full Frame excluding preamble.
On reset, all chips have a logical address of 0. In order to access to a specific chip later, we must give them different addresses.
Warning: Chip Address is different from chip index on the chain. It is a logical concept configurable by software.
To set Chip Address of all chips one by one, we must not send commands to ALL chips, just to the chip with Address = 0, so the first chip on the chain will get the command and not propagate it downward.
The Set Chip Address Command format is:
No Response is returned by the chip.
The Write Register Command format is:
No Response is returned by the chip.
The Read Register Command format is:
Sending a Read Register Command to ALL chips on the chain is very useful to enumerate them (usually with the Chip Address register), every chip on the chain will send a Response that will be propagated upward.
The Register Value Response format is:
Warning: sometimes a Register Value can be sent spontaneously by a chip (usually the Core Register Value register).
The Chain Inactive Command format is:
No Response is returned by the chip.
The Send Job Command format is:
Once hashing, when a nonce is found by a chip on the chain, it is sent on the RO pin (and propagated upward) with this format: