0

RFM69HCW no go with Metro M0, but OK w/ UNO
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RFM69HCW no go with Metro M0, but OK w/ UNO

by DrTony13 on Wed Sep 30, 2020 5:03 pm

My RFM69HCW radio does not work with a Metro M0 Express, but it works fine with an UNO.
I'm using the hardware MISO, MOSI, and SCK via handy soldered jumpers to pins 11, 12, and 13 on Adafruit's lovely Data Logger board that is stacked on top of the processor.

Here's my pinout defines for the RFM69:
#define RFM69_INT 2
#define RFM69_RST 5
#define RFM69_CS 9

An interesting symptom on the faulty Metro M0 and RFM69 combination is that I don't see any Serial Monitor messages like at the start of the setup: Serial.println("RFM69 Test");
Using the same RFM69HCW, wiring, pin definitions and code it works OK with an UNO (or a Metro 328). I get all the serial monitor messages - and it all works! But not for Metro M0 Express. I really need the Metro M0 Express for its larger memory SAM processor and stacking with the Data logger and LCD boards.

BTW I love all my Feather M0 Expresses with their RFM69 modules - they are all happily choo-chooing.
I don't pretend to be an expert so I would appreciate any help and advice.

DrTony13
 
Posts: 11
Joined: Mon Aug 27, 2018 4:07 pm

Re: RFM69HCW no go with Metro M0, but OK w/ UNO

by mikeysklar on Thu Oct 01, 2020 7:55 pm

Hi DrTony13,

Did you take a look at our Adafruit RFM69 M0 combo board guide? It has long section for code adaptations for the M0+RFM69 to function. I'm not suggesting you purchase this hardware, simply that you review the code changes like the USBVIRTUAL serial port and PWM stuff.

https://learn.adafruit.com/adafruit-fea ... ches-to-m0

Code: Select all | TOGGLE FULL SIZE
#if defined(ARDUINO_SAMD_ZERO) && defined(SERIAL_PORT_USBVIRTUAL)
  // Required for Serial on Zero based boards
  #define Serial SERIAL_PORT_USBVIRTUAL
#endif


Then take a look at some of the examples code examples with warnings which should also help with pin selection.

https://learn.adafruit.com/adafruit-fea ... fm69-radio

mikeysklar
 
Posts: 4920
Joined: Mon Aug 01, 2016 8:10 pm

Re: RFM69HCW no go with Metro M0, but OK w/ UNO

by DrTony13 on Thu Oct 01, 2020 8:20 pm

Hi mikeysklar,

Thank you for your review to help solve my Express M0 problem to run an RFM69HCW.

Following your advice, I will review the Adafruit RFM69 M0 combo board guide.

BTW - I highly recommend AF's Feather M0 Express RFM69.
I have a few of them working with the RadioHead IDE examples.

DrTony13
 
Posts: 11
Joined: Mon Aug 27, 2018 4:07 pm

Re: RFM69HCW no go with Metro M0, but OK w/ UNO

by DrTony13 on Fri Oct 02, 2020 4:51 pm

Hi mikeysklar,

Problem solved! Thank you !

The Metro M0 Express now runs the RFM69HCW packet radio just fine after I directly connected their respective hardware SPI pins (i.e., MISO, MOSI, and SCK).

My system consists of the RFM69HCW mounted on a AF ProtoShield (ID 1141) stacked on a Data Logging Board (ID ) and finally, on top, an LCD keypad (ID ID: 716).
All of that is stacked on top of an AF Metro 328 (ID 50) or an AF Metro M0 Express, when I need more choo-choo to run more I2C sensors, actuators, and store the resulting data.

Unfortunately, on the ProtoShield, I did not find any direct access to the pass-thru stacking header connections for MISO, MOSI and SCK. It would be nice to have those links.
To connect the RFM69's MISO, MOSI and SCK, my trick of connecting it to pins 11, 12, & 13 and soldering the Data Logger board's jumpers (MISO, MOSI and SCK) to its pins 11, 12 and 13 works fine with an UNO or Metro 328, BUT NOT with the Express M0 ! Evidently, the M0 Express does not like its pins to be used this way without going thru the details of properly setting up its GPIOs. But then I would need different software for the 328s and M0.

Since the Proto Shield doesn't give access to its SPI connector, I cut this boards stacking header pins 11, 12, and 13 going down to the Metro M0. So now it has direct access to the Data Logger board's SPI jumpers to those same pins.

Let me know if anyone has a solution for making the M0 Express pins 11, 12, and 13 ignore being driven by the Data Logger Boards jumpers to SPI on those same pins.
I'm far from being an expert on this, but love working with it!



soldering the

DrTony13
 
Posts: 11
Joined: Mon Aug 27, 2018 4:07 pm

Re: RFM69HCW no go with Metro M0, but OK w/ UNO

by mikeysklar on Mon Oct 05, 2020 9:49 am

Hi DrTony13,

I'm glad your Metro M0 Express setup is working.

Are you using the Adafruit Adalogger Featherwing with a Feather M0 Express that is the issue with the SPI pins? I'm a little confused since you didn't put in a part number and it looks like you have several different controllers you are using.

mikeysklar
 
Posts: 4920
Joined: Mon Aug 01, 2016 8:10 pm

Re: RFM69HCW no go with Metro M0, but OK w/ UNO

by DrTony13 on Mon Oct 05, 2020 2:55 pm

Hi mickeysklar,

Thanks again for your help and patience. Like your many other Adafruit fans, I really appreciate it.
I thought I had this problem licked, but it still fails in my full up system.

Sorry I omitted the Data Logging Board's ID#. It is an Adafruit Assembled Data Logging shield for Arduino ID 1141.
I have several of these data logger boards and they work fine except recently when I connected one in a system with the RFM69HCW (ID 3070) and a Metro M0 Express.

The system I still have trouble with consists of a stack of 4 boards (starting from the top):
1) LCD keypad (ID: 716).
2) Data Logging Board (ID 1141)
Note: I jumped this board's VDDIO to +5V to pull-up the SD card's CS pin when it's given a digital.Write HIGH. I also jumped pins 11, 12 and 13 to MOSI, MISO, and SCK.
3) RFM69HCW break out board is mounted in an AF ProtoShield (ID 1141)
Connections go to 3V and GND, plus pin 2 (RFM69_INT), pin 5 (RFM69_RST), pin 9 (RFM_CS) and pins 11, 12 and 13 for MOSI, MISO, and SCK.
4) Metro M0 Express (ID 3505).

My Arduino IDE software for the Metro M0 Express compiles, but when I load it into the Metro M0 Express, the system hangs up.
The main symptom is that the SPI bus LED remains ON and sometimes the Metro M0's NeoLED remains bright green.
What makes me crazier is that everything works, if I replace the Metro M0 Express with a Metro 328 (ID 50) and change the board selection in Tools.
But I really need the M0 Express's bigger capabilities to program and run many I2C sensors.

The RFM69HCW and Data Logger SD card share the same SPI bus pins for MISO, MOSI and SCK, but different Chip Selects: pin 10 for the SD and pin 9 for the RFM69HCW.
Is there something I've done wrong or missing to properly setup the Metro M0 Express's SPI to run both the SD card and RFM69 ?

As an aside - I've had excellent results making other systems using pairs of Adafruit Feather M0 RFM69HCW Packet Radios 915 MHz (ID 3176).

DrTony13
 
Posts: 11
Joined: Mon Aug 27, 2018 4:07 pm

Re: RFM69HCW no go with Metro M0, but OK w/ UNO

by mikeysklar on Tue Oct 06, 2020 2:27 pm

Hi DrTony13,

Thank you for the detailed description.

Do you think it is 5v issue? It sounds like you might be creating an issue on the SPI bus by pulling the CS pin to 5v (instead of 3.3v) when working a 3v Metro M0 Express.

Data Logging Board (ID 1141)
Note: I jumped this board's VDDIO to +5V to pull-up the SD card's CS pin when it's given a digital.Write HIGH. I also jumped pins 11, 12 and 13 to MOSI, MISO, and SCK.


Another question and way to test this would be what happens when only the data logging board is plugged into your metro m0 express with your current configuration. Does the SPI LED stay ON and the Metro M0 Express hang?

mikeysklar
 
Posts: 4920
Joined: Mon Aug 01, 2016 8:10 pm

Re: RFM69HCW no go with Metro M0, but OK w/ UNO

by DrTony13 on Wed Oct 07, 2020 3:53 pm

Hi mikeysklar,

Thank you again.
A bit of research shows you are spot-on to question the 5 volt jumper choice I made on the Data Logger board when using it with a Metro MO Express to drive the SD card's CS pin. This is a key point because we have lots of Data Loggers working with 5V Metro 328s and are moving to new systems using DLs with the 3V Metro M0 Express.

Unfortunately, pages 24 and 25 of the otherwise excellent Data Logger documentation wasn't very clear to me on this point: https://learn.adafruit.com/adafruit-data-logger-shield

While the Data Logger board schematic shows it has a 4050 level shifter to bring its Chip Select pin 10 comfortably down to 3V, unfortunately the DL's VDDIO 5V jumper will apply 5V via 10K Ohms directly to the M0's ATSAMD21G18 D10 pin when I command that pin to go HIGH. This clearly exceeds The Maximum Rating of the SAMD's pin voltage: "Vdd + 0.3V" For Vdd = 3.3 V that's 3.6 V Max, so all bets are off at 5V. I'm lucky to have anything working after punishing the SAMD that way. (AF may have saved me by their 10K resistor).

The lesson I learned is to connect the VDDIO jumper to 3V when using it with a 3V processor and use a level shifter (ID 1875) when going out to drive a string of 5V I2C sensors.

Thanks to AF's Product ID 3505 docs, I found the max ratings for Metro M0 Express on page 935 of its ATSAMD21G18 data sheet Table 36-1.
https://cdn-shop.adafruit.com/product-f ... asheet.pdf

(Atmel could have helped if they put their Max ratings and Table of Contents earlier in their 1110 page manual than on pages 935 and 1104.)

DrTony13
 
Posts: 11
Joined: Mon Aug 27, 2018 4:07 pm

Re: RFM69HCW no go with Metro M0, but OK w/ UNO

by mikeysklar on Thu Oct 08, 2020 10:10 am

Awesome. I'm glad this was as simple as a 3v vs 5v issue. Thank you for your feedback.

mikeysklar
 
Posts: 4920
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.