RFM69HW demo application for blue pill?

Post here first, or if you can't find a relevant section!
User avatar
mrburnette
Posts: 2208
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: RFM69HW demo application for blue pill?

Post by mrburnette » Wed Dec 27, 2017 5:18 pm

the bug is in the chip.
Oh, my :shock:

One man's bug is another's feature.

Ray

turboscrew
Posts: 78
Joined: Fri Mar 10, 2017 7:36 pm

Re: RFM69HW demo application for blue pill?

Post by turboscrew » Wed Dec 27, 2017 5:42 pm

OK. That's probably the fix to situations where the HW NSS doesn't seem to do anything, but in my chips the NSS seems to go low just as expected, but it doesn't go high - at least in any reasonable time.

I just checked. I had left a comment to myself in my code that turning SSOE to zero didn't help... ;-)

And my Arduino-STM32 core was downloaded Dec 17. Is that new enough?
Last edited by turboscrew on Wed Dec 27, 2017 6:10 pm, edited 1 time in total.

User avatar
mrburnette
Posts: 2208
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: RFM69HW demo application for blue pill?

Post by mrburnette » Wed Dec 27, 2017 5:46 pm

turboscrew wrote:
Wed Dec 27, 2017 5:42 pm
OK. That's probably the fix to situations where the HW NSS doesn't seem to do anything, but in my chips the NSS seems to go low just as expected, but it doesn't go high - at least in any reasonable time.
Do you need a 10K pullup?

turboscrew
Posts: 78
Joined: Fri Mar 10, 2017 7:36 pm

Re: RFM69HW demo application for blue pill?

Post by turboscrew » Wed Dec 27, 2017 7:17 pm

Well, in my own projects I've been using SW NSS and some other GPIO and I haven't had any problems. And with SW NSS I can put more than one chip on the same SPI "bus". Just separate NSS-pin for each... :)

Maybe that NSS-changing hasn't worked. I think I'll remove the NSS-pin mappings and try with the default (PA4) next.

I don't think any additional pull-ups should be needed? I don't think the HW NSS-pin is open drain - at least open drain without internal pull-up?

turboscrew
Posts: 78
Joined: Fri Mar 10, 2017 7:36 pm

Re: RFM69HW demo application for blue pill?

Post by turboscrew » Thu Dec 28, 2017 7:24 am

Mrburnette, you were referring to this?
viewtopic.php?f=14&t=300
So the NSS is PA4 and it now should be controlled by SW?

turboscrew
Posts: 78
Joined: Fri Mar 10, 2017 7:36 pm

Re: RFM69HW demo application for blue pill?

Post by turboscrew » Thu Dec 28, 2017 9:15 am

Reverting all NSS-changes and using PA4 as NSS I got it to run once a couple of rounds before it got stuck.
The other times I tried, it didn't seem to work at all.
[edit]
It did start to run all the way all of a sudden. Doesn't seem to be very stable program...
But the SPI didn't seem to work. Register dump was all 0xFFs.

Looks like the RFM69-code is too old. It tries to handle NSS by itself, and it probably conflicts with the core...
I tried to make it use PA3 as NSS again, but then the SW froze almost immediately...

User avatar
mrburnette
Posts: 2208
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: RFM69HW demo application for blue pill?

Post by mrburnette » Thu Dec 28, 2017 1:22 pm

turboscrew wrote:
Thu Dec 28, 2017 9:15 am
Reverting all NSS-changes and using PA4 as NSS I got it to run once a couple of rounds before it got stuck.
The other times I tried, it didn't seem to work at all.

[edit]
It did start to run all the way all of a sudden. Doesn't seem to be very stable program...
But the SPI didn't seem to work. Register dump was all 0xFFs.

Looks like the RFM69-code is too old. It tries to handle NSS by itself, and it probably conflicts with the core...
I tried to make it use PA3 as NSS again, but then the SW froze almost immediately...
Generally, one does not see "random issues" with software issues; that is, software typically runs until something bad happens then things "break." Reset and repeating tends to give the same results. Now, we do see crazy things happens with buffer overflows and such which is often difficult to isolate.

Just asking, but are you sure all of the wiring connections are as short as possible and are properly fastened? Is the 5V power supply rock solid? Look to other potential wiring concerns like an inexpensive solderless breadboard, etc.


Ray

turboscrew
Posts: 78
Joined: Fri Mar 10, 2017 7:36 pm

Re: RFM69HW demo application for blue pill?

Post by turboscrew » Thu Dec 28, 2017 6:08 pm

I'm using two 1.5V batteries (AA) - this is blue pill. And yes, both blue pill and the RFM-module should run fine (I recall 3.6V - 2.8V).
Regardless of the one run with a couple of rounds, it usually starts or not. Either it jams at about the first "sending" or it'll keep going.
It just looks like the SPI is not working.
The cables are not as short as possible, but 20 cm DuPonts. My breadboard is still in mail, so the DuPonts go directly from pin to pin.
(It was pretty hard to find 2mm-to-0.1" DuPonts for the RFM-module.)

Oh, and with my own code and the same DuPonts, my CC1101-modules work fine. And I can also receive with the RFMs, but I haven't managed to make them send anything. That's why I wanted to try with some code that's known to work.

User avatar
mrburnette
Posts: 2208
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: RFM69HW demo application for blue pill?

Post by mrburnette » Fri Dec 29, 2017 2:37 am

That's why I wanted to try with some code that's known to work.
I understand. But I have not seen any of the forum members post to this thread with a clean lib for the RFM69HW device.
Unless someone points us to a tested library, it appears that you will either need to port your own or select a different uC architecture.

SPI/I2C is where a logic analyzer really shines.

I am still suspicious of the stability of the wiring. When you have your breadboard, retest using the shortest length of wire.

I would strongly suggest you select LiFePO4 cell for your battery instead of 2x 1.5V cells. uC prefer DC supply with low impedance.


Ray

turboscrew
Posts: 78
Joined: Fri Mar 10, 2017 7:36 pm

Re: RFM69HW demo application for blue pill?

Post by turboscrew » Fri Dec 29, 2017 8:30 am

mrburnette wrote:
Fri Dec 29, 2017 2:37 am
I understand. But I have not seen any of the forum members post to this thread with a clean lib for the RFM69HW device.
Unless someone points us to a tested library, it appears that you will either need to port your own or select a different uC architecture.
Yes. I've been thinking about the two other options: the LowPowerLab's and Hessling's. Both just seem to require quite a lot of work.

Post Reply