Conversation
Meowcaroni
left a comment
There was a problem hiding this comment.
Overall pretty good, just need more descriptiveness and formatting fixes
| | SPDR (Data register) | 000 | R/W 0x00 | Holds the byte to be transmitted or the byte just recieved | | ||
| | SPCR (Control Register) | 001 | R/W 0x00 | Enables SPI< selects master/slave mode, and sets clock polarity | | ||
| | SPSR (Status Register) | 010 | R/W 0x02 | Indicates transfer completion, write collisions, and mode faults. | | ||
| | SPBR (Baud Rate Register) | 011 | R/W 0x02 | Sets the clock frequency divider for the SCK signal. | |
There was a problem hiding this comment.
Baud Rate, although applicable here, is a specific terminology for UART since it uses asynchronous clock signals. To prevent confusion, please use a different name like suggested below:
| | SPBR (Baud Rate Register) | 011 | R/W 0x02 | Sets the clock frequency divider for the SCK signal. | | |
| | SPCD (Clock Divider Register) | 011 | R/W 0x02 | Sets the clock frequency divider for the SCK signal. | |
| | SPCR (Control Register) | 001 | R/W 0x00 | Enables SPI< selects master/slave mode, and sets clock polarity | | ||
| | SPSR (Status Register) | 010 | R/W 0x02 | Indicates transfer completion, write collisions, and mode faults. | | ||
| | SPBR (Baud Rate Register) | 011 | R/W 0x02 | Sets the clock frequency divider for the SCK signal. | | ||
| | CSCR (Chip Select Register) | 100 | R/w 0xFF | **Manages multiple Slave Select lines for peripheral addressing.** | |
There was a problem hiding this comment.
Not sure why the description here is highlighted, might just be a formatting error
| Purpose & Role: | ||
| The Serial Peripheral Interface (SPI) is a high speed, 4-wire, full-duplex communication protocol used for short distance data exchange between microcontrollers and peripherals. It uses a shared clock signal to synchronize data transfer. | ||
|
|
||
| Parameters (Registers) & Signals: |
There was a problem hiding this comment.
Please split parameters and input/output signals into separate tables to prevent confusion
| | Irq_o | Out | 1b | Interrupt request sent to CPU upon transfer completion or error. | | ||
|
|
||
| Configurations: | ||
| Clock Modes: Supports all four SPI modes defined by CPOL and CPHA to ensure compatibility with various peripheral timing requirements.Master/Slave: Primarily configured as a Master in SoC environments, but can be toggled to Slave mode via the SPCR.Baud Rate: The sclk_o frequency is derived by dividing the system clock by the value in SPBR.AXI-Lite valid/ready signals are required for internal register stability before data is shifted out to the physical SPI lines. |
There was a problem hiding this comment.
If possible, define CPOL and CPHA for members to understand how they affect SPI's behavior.
| Timing is strictly governed by clk_o. Data is shifted out and shifted in simultaneously during every clock cycle. To reduce CPU overhead, 16-byte Rx/Tx FIFOs are utilized. Interrupts are triggered when Rx reaches a threshold or the Tx is empty. | ||
|
|
||
| Errors & Dependencies: | ||
| Erros are managed by irq_o. Several errors can occur; write collision, mode fault, dependencies, or GPIO. |
There was a problem hiding this comment.
Please give one-line descriptions of what each of these errors is and how it happens (Also typo on "erros" in description)
There was a problem hiding this comment.
Looking good so far, just need a little more descriptiveness and formatting fixes. Please add heading syntax (##) to each section for visuals and feel free to use bullet points (-) or (*) to organize info
Description
Created SPI One pager