
Peripheral Microcontroller API
The Peripheral Microcontroller communicates via the SPI bus using a 3 byte packet structure. Flag 1
serves as the SPI slave select line. The SPI bus is bi-directional. Commands are always initiated by
the DSP. The Peripheral Microcontroller only responds. The Peripheral Microcontroller is not a fast
device, as such you must delay transmission of each byte by 15us or more. This gives the Peripheral
Microcontroller time to execute each command.
Most packets will have this form:
Cycle
DSP -> PM
PM-> DSP
Byte 1
Command
Status
Byte 2
Data
Echo Command
Byte 3
0x00
Response
Command Summary
Name
Description
PM_Cmd_NOP 0x00
No
Operation
PM_Cmd_COM_WR
0x01
Transmit a byte from the RS-232 port
PM_Cmd_COM_RD
0x02
Receive a byte from the RS-232 port
PM_Cmd_VERSION
0x03
Firmware version of the Peripheral Microcontroller
PM_Cmd_COM_BAUD
0x04
Set the UART baud rate
PM_Cmd_EE_ADDR
0x05
Set the address of the EE Memory
PM_Cmd_EE_WR
0x06
Write a byte to EE Memory
PM_Cmd_WD 0x07
Watchdog
Timeout
PM_Cmd_COM_RESET
0x08
Reset the UART
PM_Cmd_EE_WREN
0x09
Enable Writes to EE Memory
PM_Cmd_RESET
0x0A
Reset the dspstak
PM_Cmd_MODE
0x0B
Get the dspstak mode setting
PM_Cmd_COM_RTS_CTS 0x0C
RS-232
handshaking
PM_Cmd_EE_RD
0x0D
Read a byte from EE Memory
-- Reserved
0x0E
PM_Cmd_RESYNC
0x0F
Used to resync the Peripheral Microcontroller
-- Reserved
>0x0F
dspstak™ 21262sx User Manual
Page 21