spi_group
Differences
This shows you the differences between two versions of the page.
| spi_group [ 17.08.2025 05:40] – created lars | spi_group [ 17.08.2025 05:52] (current) – lars | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== SPI ====== | ||
| + | |||
| + | Different variants exist. Usually SPI refers to the Motorola Serial Peripheral Interface. Other variants are the Texas Instruments Serial protocol (SSP) and the National Instruments Microwire. | ||
| + | |||
| + | |||
| + | ===== Protocol ===== | ||
| + | |||
| + | Most significant bit first | ||
| + | |||
| + | |||
| + | ===== Modes ===== | ||
| + | There are 4 Modes. Defied by the two settings "clock polarity" | ||
| + | |||
| + | "clock polarity" | ||
| + | - Clock line is low when idle. | ||
| + | |||
| + | "clock polarity" | ||
| + | - Clock line is high when idle. | ||
| + | |||
| + | "clock phase" CPHA = 0: | ||
| + | - first data bit is output on /CS activating (going low). | ||
| + | - data bits change when clock goes to idle level. | ||
| + | - data bits are read when clock comes from idle level. | ||
| + | |||
| + | "clock phase" CPHA = 1: | ||
| + | - first data bit starts on first edge after /CS activates. | ||
| + | - data bits change when clock comes from idle level. | ||
| + | - data bits are read when clock goes to idle level. | ||
| + | | ||
| + | ^ mode ^ CPOL ^ CPHA ^ write bit ^ read bit ^ | ||
| + | | 0 | 0 | 0 | clock goes low, and when /CS activates | ||
| + | | 1 | 0 | 1 | clock goes high | clock goes low | | ||
| + | | 2 | 1 | 0 | clock goes high, and when /CS activates | clock goes low | | ||
| + | | 3 | 1 | 1 | clock goes low | clock goes high | | ||
| + | |||
| + | |||
| ===== SPI group ===== | ===== SPI group ===== | ||
| Line 129: | Line 165: | ||
| **type**: int (Hz) | **type**: int (Hz) | ||
| + | |||
| + | |||
| + | ===== API ===== | ||
| + | The part " | ||
| + | |||
| + | < | ||
| + | void signal_name_transfer(const uint8_t *data_send, | ||
| + | const uint8_t *data_receive, | ||
| + | const uint32_t length )</ | ||
| + | Will send " | ||
| + | |||
spi_group.txt · Last modified: by lars
