Dear Members,
I want to use SPI LCD and Sdcard, they have different CS, but sharing the same SPI ports,
I have used different SPI instance but not giving us a good response yet, any clues ?
SPI1 for SDcard, SPI2 for LCD,
SPI configuration for LCD:
nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG; spi_config.ss_pin = SPI_SS_PIN; spi_config.miso_pin = SPI_MISO_PIN; spi_config.mosi_pin = SPI_MOSI_PIN; spi_config.sck_pin = SPI_SCK_PIN; spi_config.frequency = NRF_SPI_FREQ_1M; ///< 4 Mbps nrf_gpio_cfg_output(SPI_DC_PIN_LCD); nrf_gpio_cfg_output(SPI_RES_PIN_LCD);
for SD card :
#define SDC_SCK_PIN NRF_GPIO_PIN_MAP(0,21) ///< SDC serial clock (SCK) pin. #define SDC_MOSI_PIN SER_CON_SPIS_MOSI_PIN ///< SDC serial data in (DI) pin. #define SDC_MISO_PIN NRF_GPIO_PIN_MAP(0,20) ///< SDC serial data out (DO) pin. #define SDC_CS_PIN ARDUINO_10_PIN ///< SDC chip select (CS) pin.
Any ideas ? thanks