diff --git a/configs/samv71-xult/src/sam_spi.c b/configs/samv71-xult/src/sam_spi.c index 712db8e0cb..563c03965c 100644 --- a/configs/samv71-xult/src/sam_spi.c +++ b/configs/samv71-xult/src/sam_spi.c @@ -70,6 +70,10 @@ void sam_spidev_initialize(void) { #ifdef CONFIG_SAMV7_SPI0_MASTER + /* Make sure that the EDBG DIGI_SPI CS is high so that it does not interfere */ + + (void)sam_configgpio(CLICK_EDBG_CS); + #ifdef CONFIG_SAMV71XULT_MB1_SPI /* Enable chip select for mikroBUS1 */ diff --git a/configs/samv71-xult/src/samv71-xult.h b/configs/samv71-xult/src/samv71-xult.h index f0a9e92e2e..273f008b5d 100644 --- a/configs/samv71-xult/src/samv71-xult.h +++ b/configs/samv71-xult/src/samv71-xult.h @@ -611,6 +611,11 @@ #define CLICK_MB2_CS (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \ GPIO_PORT_PIOC | GPIO_PIN9) +/* EDBG DGI_SPI Chip select (PD12) */ + +#define CLICK_EDBG_CS (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \ + GPIO_PORT_PIOD | GPIO_PIN12) + /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/drivers/wireless/ieee802154/mrf24j40/mrf24j40_regops.c b/drivers/wireless/ieee802154/mrf24j40/mrf24j40_regops.c index 6e8e79d3dc..b5c2c7bc03 100644 --- a/drivers/wireless/ieee802154/mrf24j40/mrf24j40_regops.c +++ b/drivers/wireless/ieee802154/mrf24j40/mrf24j40_regops.c @@ -129,7 +129,7 @@ uint8_t mrf24j40_getreg(FAR struct spi_dev_s *spi, uint32_t addr) buf[len++] = 0xFF; /* dummy */ - mrf24j40_spi_lock (spi); + mrf24j40_spi_lock(spi); SPI_SELECT (spi, SPIDEV_IEEE802154(0), true); SPI_EXCHANGE (spi, buf, rx, len); SPI_SELECT (spi, SPIDEV_IEEE802154(0), false);