MoteinoM0 absent from Arduino IDE when SPI device is connected [~solved]

Started by jdheinzmann, February 04, 2020, 12:17:45 AM

Felix

Ah, did I send one with FLASH..  ::)
The UF2 does not require the flash chip no. But it will check it if it's there, for a re-flash firmware image.
Are you able to remove the flash chip?

jdheinzmann

Yup, you did.
Yes, I am able... so I did.

It behaves the same without the flash chip.  With the accelerometer connected and no pull-down added, it boots, enumerates the serial port and my sketch reads the accelerometer and sends data over the radio link as desired.

Next step?



jdheinzmann

Hi, Felix,

Solved?  For me, it is.  First I discovered that I could work around any pulling up on MISO by adding a pull-down of low enough resistance to counteract it.  Enough to pull the voltage to a low state.  In my case, a 1 kΩ pull-down to counteract the 10 kΩ of pull-ups.  It is notable though that some pulling down is even required just to run with the logic analyzer.  But that is not a good long term solution for me because I do not want to live with the current draw associated with such a low resistance pull-down. 

So then you custom flashed a board for me that works without the pull-down.  So that, indeed, solves the immediate problem for me.

But for others, it may not be so obvious what they should do.  So I am not so sure it is solved for them.  Perhaps you could comment further on the mechanism causing this problem and if and when we should expect M0s to come with firmware to avoid it by default.

Thanks for all your help, Felix.  -JD

Felix

I haven't had other reports that any other SPI device would cause a problem.
Anyway I do plan to roll out the new BL for the M0 soon.

Felix

I just released a new MoteinoSAMD Boards Package (v1.5.0) which includes the UF2 bootloader, and all MoteinoM0's (and CurrentRangers) will now ship with this new bootloader.
Hopefully this takes care of any SPI issues that you observed.
At the very least it will make it easier to replace the bootloader with a simple drag-and-drop on the emulated "flash-drive" without the need of a special programmer or having to return a board.

jdheinzmann

Hi, Felix,

Quote from: Felix on March 03, 2020, 11:38:18 PM
I just released a new MoteinoSAMD Boards Package (v1.5.0) which includes the UF2 bootloader, and all MoteinoM0's (and CurrentRangers) will now ship with this new bootloader...

This is great news!

Quote from: Felix on March 03, 2020, 04:22:32 PM
I haven't had other reports that any other SPI device would cause a problem.

You don't even need a SPI device to reveal this problem.  Simply a 470 kΩ pullup on MISO will do it.  Or a cheap Logic Analyzer probe connected to MISO will do it.  At least, that's what happens on an M0 with a 915 Mhz RFM69HCW and no extra flash.

In any event, thank you for these changes and all your help.

-JD