RP2040 with RFM95 LoRa Radio failing to reset consistently

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bicknrown
 
Posts: 6
Joined: Wed Apr 19, 2023 7:29 am

RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by bicknrown »

Hello!
I recently picked up two RP2040 with RFM95 LoRa Radio Feathers to mess around with.

One of them works just as you'd expect, uploading a modified blink program works as intended, pressing and releasing the reset button restarts the blink program, all is good.

The other is able to load programs, and is able to software reset, but inconsistently will or will not reset with the hardware reset button. The same situation happens with physically powering and un-powering the device.

There appear to be no physical defects with the device that I can see, either with my eyes or a magnifying glass.

What I have tried:
- turning it off and back on.
- clearing the onboard flash
- repeatedly pressing the reset button until it actually resets(about every 10-30 presses)

I may be missing something here, but I believe I just happened to get a dud.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by mikeysklar »

You will need to use both the BOOTSEL and RESET button in combination to enter bootloader mode. Can you do that on the unit that is having trouble and re-upload the basic blink example?
The Feather RP2040 has two buttons.

The BOOTSEL button is connected to GPIO4 for use in your code. It is also used to enter the bootloader. To enter the bootloader, press and hold BOOTSEL and then power up the board (either by plugging it into USB or pressing RESET). The bootloader is used to install/update CircuitPython.

The RESET button restarts the board and helps enter the bootloader. You can click it to reset the board without unplugging the USB cable or battery.

User avatar
bicknrown
 
Posts: 6
Joined: Wed Apr 19, 2023 7:29 am

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by bicknrown »

Both boards have no trouble being flashed, and after initially flashing them with no power loss, they run as expected.

On power loss, or directly pressing the reset button on the seemingly faulty board, the RP2040 does not appear to either leave reset, or enter the boot sequence.

The correctly working board does not have this issue and can reset on power loss, as well as the reset button, after flashing, and boot properly.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by mikeysklar »

Would you mind trying the factory reset image for your board? Make sure to grab the rfm9x not the rfm69. These just went up last week.

https://github.com/adafruit/Adafruit-Fe ... tory-reset

https://learn.adafruit.com/feather-rp20 ... tory-reset

User avatar
bicknrown
 
Posts: 6
Joined: Wed Apr 19, 2023 7:29 am

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by bicknrown »

On the known good board, flashing the factory image works as expected, resetting the board will restart the color change sequence on the neopixel as intended. Afterwards flashing the blink program, it also still works as expected, and resetting will restart the blink program.

On the seemingly bad board, flashing the factory image seems to work as expected, and resetting the board appears to recycle the neopixel. However when flashing the blink program to this board, the reset problem is still persistent.
It works after initial flash, but is inconsistent on reset or power cycle.

Usually I would chalk something like this up to a nuance in how the boards are laid out as being different from the pi pico, but the fact that the behavior from two identical boards with identical firmware is different leads me to there being a problem with the board itself.

It is interesting how the factory program seems to work correctly, but this could be due to some side-effect interaction with the MCU on the neopixel itself and the PIO state machines. I would need to do more digging to confirm that, but that's just my hunch.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by mikeysklar »

Since two boards are behaving different with the factory image lets start the replacement process for the problematic board. Thank you for taking the time to troubleshoot this.

Please e-mail [email protected] and request a replacement unit. They will need a link to this forum thread and your order#.

User avatar
bicknrown
 
Posts: 6
Joined: Wed Apr 19, 2023 7:29 am

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by bicknrown »

Will do,
Thank you for the guidance, and links to the resources. I know these boards are a relatively new product, so to get this level of support has been quite nice.
I'll follow up here if there end up being more complications directly related to this topic.
Thanks again!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by mikeysklar »

If it is not too much trouble please let us know if the replacement resolves all the issues you had experienced.

User avatar
bicknrown
 
Posts: 6
Joined: Wed Apr 19, 2023 7:29 am

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by bicknrown »

mikeysklar wrote: Fri May 12, 2023 4:18 pm If it is not too much trouble please let us know if the replacement resolves all the issues you had experienced.
Unfortunately the new board seems to be exhibiting the same problems as the previous defective board.
I'll layout more information here for each of the boards and hopefully that can shed more light on the situation.

I attempted to visually inspect the board with a USB microscope, and did not notice any physical defects, if there were any.

Firmware used for testing(in no particular order):
  • A modified blink program which changes the LED pin to 13 for the feather.
    Compiled on Debian 11.6 with GCC 10.2.1
    pico-sdk at this commit ID
    UF2 for this is attached for completeness.
    blink.uf2
    compiled modified blink program
    (18.5 KiB) Not downloaded yet
  • The factory reset UF2 image for this board, linked here, and linked directly here.
  • The "Flash Nuke" UF2 linked in the guide for the board here, and linked directly here.
  • CircuitPython version 8.1.0-rc.0 for this board, linked here, and directly here.
    The python program used for testing was the example blink program used in the guide for this board, linked here.
Individual board testing:
  • Board 0 (the first board I worked with out of the original batch of two):
    Flashing any of the listed firmware works and resets as expected, both when pressing and releasing the reset button, and when removing and reapplying power to the board.
  • Board 1 (the second board I worked with, first exhibiting the reset problems):
    Flashing the compiled "blink" program exhibits proper behavior directly after flashing, but will not consistently run the program when attempting to reset the board either through pressing the reset button, or removing and re-applying power.
    This behavior does not change when flashing either the "factory reset" or "flash nuke" UF2 and re-flashing the blink program.
    Flashing the factory reset UF2 only, the board appears to reset properly in both pressing the reset button, and removing and re-applying power.
    This also appears to be the case with CircuitPython.
    Flashing the linked CircuitPython UF2 and uploading the linked "blink" program, the board can both reset through the reset button, and removing and re-applying power.
  • Board 2 (the new replacement board, also exhibiting the reset problems):
    This board is exhibiting the exact same behavior as board 1 verbatim.
At this point I'm at a loss. I'd have to imagine there is some very borderline undefined behavior which the directly compiled UF2s are exercising, but CircuitPython, and perhaps the factory images, are not. I would have to dig further through the documentation about the reset procedure for the RP2040 and both the reference implementation of the reset circuit and the implementation this feather board is using to pin this down further on my own.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by mikeysklar »

Thank you for the careful summary of where you are at.

On the backside of the two RP2040 LoRA boards you have now is there any markings (version numbers) that are different?

Can you try compiling the blink example on your Linux box or using another OS with the Arduino IDE? Keep in mind we are using the Arduino PhilHower core.

In your experimenting with the reset button did you ever try connecting the RST PIN to GND?

User avatar
bicknrown
 
Posts: 6
Joined: Wed Apr 19, 2023 7:29 am

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by bicknrown »

While digging through docs for the RP2040, and through the source and issues in the PhilHower-pico repository, I found this PR, which exactly outlines a problem relating to board reset and XOSC on adafruit boards. I initially found it through this issue. Setting the compile time option `PICO_XOSC_STARTUP_DELAY_MULTIPLIER` to the tested value the folks in thread suggested resolved the issue on both boards. There seemed to be talk of a potential hardware fix for later boards in the PR for the software fix, but it seems like we may be waiting a little longer for that yet.

It might be worth a mention in the docs (if it isn't already) about setup of the pico-sdk, and how changing the board to `adafruit_feather_rp2040` would also resolve this issue because it has the fix applied, among other things.

Intermittent hardware behaviors sure are a hoot. Thanks for all your help through this process! Hopefully it helps someone else, too.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 with RFM95 LoRa Radio failing to reset consistently

Post by mikeysklar »

Good find on the 'PICO_XOSC_STARTUP_DELAY_MULTIPLIER'. I'm sure this will help others.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”