Code: Select all
#define SPI_SLAVE(i) (REG_SPI_BASE(i) + 0x30)
#define SPI_SYNC_RESET (BIT(31))
what does this SPI_SYNC_RESET do? what are the consequences on the SPI setup or functioning?
I saw this bit is set in the SPI samples in SPI Slave interrupt service but there is no hint on why or what this actually do.
Will the configuration of the SPI hardware stay unchanged or some bits gets reset by this?
Should this bit be set in the ISR when in master mode also?
Code: Select all
#define SPI_TRANS_CNT 0x0000000F
#define SPI_TRANS_CNT_S 23
What does this "operation counter" actually count? "RO - The operations counter in both the master mode and the slave mode."
As this is 4 bits only - is this related to the SPI_W0..15 fifo registers? Something like the index of the current W register in use?
Code: Select all
#define SPI_TRANS_DONE_EN (BIT(9))
#define SPI_SLV_WR_STA_DONE_EN (BIT(8))
#define SPI_SLV_RD_STA_DONE_EN (BIT(7))
#define SPI_SLV_WR_BUF_DONE_EN (BIT(6))
#define SPI_SLV_RD_BUF_DONE_EN (BIT(5))
Is the SPI_TRANS_DONE flag the only interrupt "source" in master mode and the other _DONE flags are not used?
Code: Select all
#define SPI_USER(i) (REG_SPI_BASE(i) + 0x1C)
#define SPI_CK_OUT_EDGE (BIT(7))
#define SPI_CK_I_EDGE (BIT(6))
#define SPI_CS_SETUP (BIT(5))
#define SPI_CS_HOLD (BIT(4))
Is there a way to change the SPI CLOCK "plarity"? (the idle state of the clock)
Does the SPI_CK_OUT_EDGE control the "data out valid" on rising/falling clock? And the same for CK_I_EDGE for "data input valid"?
Best regards,
mculibrk