Clicker2: Configure EDBG SPI CS just to make that it is disabled

This commit is contained in:
Gregory Nutt 2017-08-15 18:21:10 -06:00
parent 8033f8ae5b
commit a703ed76af
3 changed files with 10 additions and 1 deletions

View File

@ -70,6 +70,10 @@
void sam_spidev_initialize(void) void sam_spidev_initialize(void)
{ {
#ifdef CONFIG_SAMV7_SPI0_MASTER #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 #ifdef CONFIG_SAMV71XULT_MB1_SPI
/* Enable chip select for mikroBUS1 */ /* Enable chip select for mikroBUS1 */

View File

@ -611,6 +611,11 @@
#define CLICK_MB2_CS (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \ #define CLICK_MB2_CS (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \
GPIO_PORT_PIOC | GPIO_PIN9) 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 * Public Types
************************************************************************************/ ************************************************************************************/

View File

@ -129,7 +129,7 @@ uint8_t mrf24j40_getreg(FAR struct spi_dev_s *spi, uint32_t addr)
buf[len++] = 0xFF; /* dummy */ buf[len++] = 0xFF; /* dummy */
mrf24j40_spi_lock (spi); mrf24j40_spi_lock(spi);
SPI_SELECT (spi, SPIDEV_IEEE802154(0), true); SPI_SELECT (spi, SPIDEV_IEEE802154(0), true);
SPI_EXCHANGE (spi, buf, rx, len); SPI_EXCHANGE (spi, buf, rx, len);
SPI_SELECT (spi, SPIDEV_IEEE802154(0), false); SPI_SELECT (spi, SPIDEV_IEEE802154(0), false);