Post by vincent on Mar 12, 2021 10:57:01 GMT
i want to use SPI channel 1 (p12 (MISO), p11(MOSI) and p13 (SCK)) with both CS on pin 10 & pin 4.
i have 2x slave connected to use either CS pin 10 or 4.
i noticed that CS pin 10 is always activated when i use the APIs below:
SPI.beginTransaction(SPISettings(2000000, MSBFIRST, SPI_MODE1));
SPI.transfer(SPI_channel, TxData1, SPI_CONTINUE);
Is using with pin 10 or pin 4 as chip select supported?
if not, how can i disable the automatic CS?
so that i can use pin toggle to activate the different pins 10 & 4.
//#define SPI_channel BOARD_SPI_SS0 /* CS = 10 MISO = P201.1, MOSI = P201.4 SCK = P201.3 */
#define SPI_channel BOARD_SPI_SS0_S1 /* CS = 10 MISO = p12, MOSI = p11 SCK = p13 */
//#define SPI_channel BOARD_SOFT_SPI_SS0 /* CS = 10 MISO = p50, MOSI = p51 SCK = p52 */
//#define SPI_channel BOARD_SOFT_SPI_SS2 /* CS = 53 MISO = p50, MOSI = p51 SCK = p52 */
//#define SPI_channel BOARD_SPI_SS1 /* MISO = P201.1, MOSI = P201.4 SCK = P201.3 */
//#define SPI_channel BOARD_SPI_SS2 /* Only for board revision 4269.06210_B1 or later --- CS = 53 MISO = p50, MOSI = p51 SCK = p52 */
#define _cs SPI_channel /* Needs to be the same as the SPI channel */