From adef84b68a6c8b10c61cbceebfbd2c878f8824c8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 16 Aug 2017 12:52:58 -0600 Subject: [PATCH] Minor updates to MRF24J40 on SAME70 Xplained; Updated to README files. --- configs/same70-xplained/README.txt | 26 ++++++++++++++----- configs/same70-xplained/src/sam_spi.c | 1 - configs/same70-xplained/src/same70-xplained.h | 6 ++--- configs/samv71-xult/README.txt | 13 +++++++++- 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/configs/same70-xplained/README.txt b/configs/same70-xplained/README.txt index 21de807dfb..c8cfe3cada 100644 --- a/configs/same70-xplained/README.txt +++ b/configs/same70-xplained/README.txt @@ -893,6 +893,11 @@ Click Shield D12 PD20 (both) SPI-MISO PD20 SPI0_MISO GPIO_SPI0_MISO D13 PD22 (both) SPI-SCK PD22 SPI0_SPCK GPIO_SPI0_SPCK + NOTE: The click shield fits close to the Arduino connect and cannot be + installed directly because it hits the RJ45 connector. You have to get + some extra Arduino connectors to raise the Click shield so that it clears + the RJ45. + Tickless OS =========== @@ -1289,10 +1294,11 @@ Configuration sub-directories disable this feature and save 8KiB of RAM! NOTE: There is an issue with capturing data in the RAMLOG: If - the system crashes, all of the crash dump information will go into - the RAMLOG and you will be unable to access it! You can tell that - the system has crashed because (a) it will be unresponsive and (b) - the LD2 will be blinking at about 2Hz. + the system crashes or hangs, then all of the crash dump/error + information will go into the RAMLOG and you will be unable to + access it! You can tell that the system has crashed because + (a) it will be unresponsive and (b) the LD2 may be blinking at + about 2Hz. You can also reconfigure to use stdout for debug output be disabling all of the CONFIG_RAMLOG* settings listed above and enabling the @@ -1324,8 +1330,16 @@ Configuration sub-directories Where is the IP address of either the E1 or I2 endpoints. STATUS: - 2017-08-16: Configurations added. Currently hangs in mrf24j40_reset() - before the NSH appears on the serial console. + 2017-08-16: Configurations added. Initially, I saw hangs i + mrf24j40_reset() before the NSH appears on the serial console. + Unlike the SAMV71-XULT, the SPI looks clean, but was hanging + nevertheless. + + Then, on subsequent testing, it "magically" started behaving + properaly and seems quite stable now.. although I did nothing to + the the problem. Perhaps the radio was in a bad state for awhile; + perhaps something I did masked the problem. However, all is well + for the time being. netnsh: diff --git a/configs/same70-xplained/src/sam_spi.c b/configs/same70-xplained/src/sam_spi.c index 60fd5c0c37..81184cf83a 100644 --- a/configs/same70-xplained/src/sam_spi.c +++ b/configs/same70-xplained/src/sam_spi.c @@ -80,7 +80,6 @@ void sam_spidev_initialize(void) /* Enable chip select for mikroBUS2 */ (void)sam_configgpio(CLICK_MB2_CS); - #endif #endif diff --git a/configs/same70-xplained/src/same70-xplained.h b/configs/same70-xplained/src/same70-xplained.h index 8a3ad6815a..5f9d52fc01 100644 --- a/configs/same70-xplained/src/same70-xplained.h +++ b/configs/same70-xplained/src/same70-xplained.h @@ -368,9 +368,6 @@ #define IRQ_MB1 SAM_IRQ_PA5 #define IRQ_MB2 SAM_IRQ_PA6 -#define MB1_CSNO SPI0_CS0 /* REVISIT PA5 is not one of the NPCS pins */ -#define MB2_CSNO SPI0_CS1 /* REVISIT PA6 is not one of the NPCS pins */ - /* SP chip selects */ #define CLICK_MB1_CS (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \ @@ -378,6 +375,9 @@ #define CLICK_MB2_CS (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \ GPIO_PORT_PIOC | GPIO_PIN9) +#define MB1_CSNO SPI0_CS1 /* GPIO_SPI0_NPCS1_1 */ +#define MB2_CSNO SPI0_CS0 /* REVISIT PC9 is not one of the NPCS pins */ + /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/configs/samv71-xult/README.txt b/configs/samv71-xult/README.txt index d8fb973c02..f66519145a 100644 --- a/configs/samv71-xult/README.txt +++ b/configs/samv71-xult/README.txt @@ -1937,14 +1937,25 @@ Configuration sub-directories STATUS: 2017-07-02: Configurations added. Not yet tested. + 2017-07-03: Initial testing, appears to be working, but endpoints fail to associate; sniffer shows that nothing sent fro the star hub. I am thinking that there is something wrong with the GPIO interrupt configuration so that no MRF24J40 interrupt are being received. - 2017-08-15: I think the GPIO interrupts are fixed but there still + + 2017-08-15: I think the GPIO interrupts are fixed but there still seems to be some issue with the SPI communications. + 2017-08-16: I believe that there is something interfering with the + MRF24J40 on the SPI0. There are other things on the bus. The + MRF24J40 requires sole use of the SPI bus because it holds MISO + low when not selected. + + I successfully brought the same logic up on the SAME70-Xplained. + The SPI signals look clean on the board and the MRF24J40 seems + fully functional. + mxtxplnd: Configures the NuttShell (nsh) located at examples/nsh. There are five