Oldland SPI Master
Oldland has an SPI master with internal SRAM to reduce wait states when transferring multiple bytes of data. There are multiple chip selects supported and the command is programmed into I/O registers before initiating the transfer.
Only SPI mode 0 transfers are currently supported.
The transfer buffer may only be accessed with byte accesses.
- : loopback enable (data is inverted).
- [8:0]: clock divider, must be a power of two.
- : CS1 enable
- : CS0 enable
- : bus busy
- : transfer go
- [15:13]: reserved
- [12:0]: transfer octets
To perform a transfer:
- select the correct divider to give the desired clock rate.
- write the bytes to be transmitted into the memory buffer.
- write the transfer length into the transfer control register.
- set the correct chip select in the chip select control register.
- write a 1 to the transfer go bit in the transfer control register.
- poll the bus busy bit.
- copy the bytes from the buffer into application memory.
The sequencer overwrites the tx bytes in the buffer with the rx bytes on reception.