Forum Discussion
ofirshe
New Contributor
1 year agoSPI driver for MAX10
Hey, I've connected an external host functioning as an SPI Master to the DE10-Lite board to communicate with the MAX10 FPGA, which acts as a slave. I’m looking for example C code or an API library t...
Jeet14
Frequent Contributor
1 year agoHi,
You can try below link on the SPI mode 1 & 3 for SPI slave.
https://community.intel.com/t5/Nios-V-II-Embedded-Design-Suite/NIOS-II-SPI-Slave-Issue/td-p/1393019
| SPI Mode | CPOL | CPHA | Shift Sclk edge | Capture Sclk edge |
| 0 | 0 | 0 | Falling (negedge) | Rising (posedge) |
| 1 | 0 | 1 | Rising (posedge) | Falling (negedge) |
| 2 | 1 | 0 | Rising (posedge) | Falling (negedge) |
| 3 | 1 | 1 | Falling (negedge) | Rising (posedge) |
Regards
Tiwari