Project

General

Profile

Resolved: Crash and freeze with a RFM69

Added by jeromelebel about 4 years ago

Hello,

I have a arduino mega with a RFM12b. I wanted to move to RFM69. I bought 2. I updated my software with the latest version of jeelib. With my arduino mega, my code never returns from rf12_initialize(). I also tried it with the demo and an arduino uno. But I have several reboots until the code freezes too.
Since I bought 2 RFM69, I tried with both. But I have the exact same problems.

I’m not sure what is wrong and how to debug that issue.

Thanks for the help


Replies (69)

RE: Crash and freeze with a RFM69 - Added by jcw about 4 years ago

This discussion has been moved to the support forum

  • your friendly admin

RE: Crash and freeze with a RFM69 - Added by JohnO about 4 years ago

Thanks @jcw.

Can you make the links between the Uno and the RFM69 as short as possible?

RE: Crash and freeze with a RFM69 - Added by JohnO about 4 years ago

jeromelebel wrote:
> What do you mean?

I understood the RFM69 was connected via a breadboard - probably with jumpers. The SPI by default is reasonably fast and may be struggling with your wiring. If the wire jumpers between the Uno and the Breadboard are as short as possible then the SPI has the best chance of working correctly. The SPI is how the radio communicates with the Uno.

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

does the rfm12 and the rfm69 have the same speed on the SPI bus?

RE: Crash and freeze with a RFM69 - Added by JohnO about 4 years ago

I am not sure, how does it bear into the situation?

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

I don’t have any issues with a rfm12 module plugged to my uno

RE: Crash and freeze with a RFM69 - Added by jcw about 4 years ago

See https://github.com/jcw/jeelib/blob/master/RF69\_avr.h\#L126

I think that RF69 speed is set to 8 MHz, while it’s 2 MHz for RF12.
Lowering it might help you find out whether there’s an electrical issue.

-jcw

> On 03 Feb 2015, at 16:36, redmine@jeelabs.net wrote:
>

RE: Crash and freeze with a RFM69 - Added by JohnO about 4 years ago

Line 291 in RF69_avr.h looks promising:

//    SPCR |= _BV(SPR0);  // Divide SPI by 4

RE: Crash and freeze with a RFM69 - Added by JohnO about 4 years ago

Hi jeromelebel, did you get to a resolution?

RE: Crash and freeze with a RFM69 - Added by martynj about 4 years ago

Did we get any images of the setup?
Running an unterminated SPI bus over long unmatched wires to a breadboard @8Mhz is unlikely to be reliable. (remember the mini-busbars hiding behind the plastic cover of the breadboard).
For clean edges, the harmonics are up around 100 MHz plus there is a single, wandering ground return just waiting to generate ground bounce and lock out the SPI bus with invalid transaction requests

I suggest cleaning up the length of the bus and/or run the SPI transactions slower.

An image would be nice….

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

Still the same problem when I uncomment RF69_avr.h:291. I tried with both RFM69 : both reboot. I tried with my RFM12 again. And it still works.

RE: Crash and freeze with a RFM69 - Added by JohnO about 4 years ago

jeromelebel wrote:
> Still the same problem when I uncomment RF69_avr.h:291. I tried with both RFM69 : both reboot. I tried with my RFM12 again. And it still works.
So it works at the slower SPI bus, that is great. The RFM12 at 2meg SPI is happy and the RFM69 at 2meg SPI is happy. That is probably way fast enough.

We have a cork mat just like yours.

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

No, still the same problem with a RFM69, even with a slow speed.

But it does work when I replace my RFM69 by a RFM12.

RE: Crash and freeze with a RFM69 - Added by JohnO about 4 years ago

Does it still display Radio Absent?

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

Radio Absent is not always there. Sometimes the arduino reboots completely, sometimes, the arduino reboots and get stuck at [RFxConsole.0]00. Sometimes the arduino reboots and shows Radio Absent.
But what is sure is : the arduino reboots as soon as it receives some data while I’m using a RFM69 no matter the SPI speed.

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

And its behavior after the reboot is unpredictable. The RFM69 doesn’t respond anymore. And I have to unplug the arduino to make it working again.

RE: Crash and freeze with a RFM69 - Added by JohnO about 4 years ago

Lets concentrate on fixing Radio Absent - can you give use a close up photograph of the RFM69 adapter board with RFM69CW.

RE: Crash and freeze with a RFM69 - Added by jcw about 4 years ago

Reboot == crash. You’ll need to stabilise the “patient” first.
It may be a hardware issue or not (I can’t tell), but until the board stays up - even if unresponsive - nothing else matters, I think.

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

I agree with jcw, I think it’s better to focus on the part where things start to behave weirdly (I mean the crash), than to try to fix consequences of a crash.

Sorry, I can’t get my cell phone focus correctly. What do you want to see on my RFM69?

RE: Crash and freeze with a RFM69 - Added by martynj about 4 years ago

A little out of frame, but the size of that wiring loop can be guessed at. Bend two pins and plug the RFM69 Adapter board into the UNO as shown in these pictures in the quest for some stability in your results.

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

I don’t understand how it is possible to plug the 5V and the pin 2 with the module.

RE: Crash and freeze with a RFM69 - Added by jcw about 4 years ago

Tricky, but it can be done with extra headers - see http://jeelabs.org/2011/02/02/meet-the-rfm12b-board/

RE: Crash and freeze with a RFM69 - Added by jeromelebel about 4 years ago

you mean by soldering a wire to the header?

RE: Crash and freeze with a RFM69 - Added by jcw about 4 years ago

I used an extra 6-pin header (not 8-pin as mentioned on that page) in between. Or disconnect some header pins and solder extra wires to the board.

(26-50/69)