RP2040 Feather with USB Host

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.
User avatar
Claude_J_Greengrass
 
Posts: 79
Joined: Sat Jul 24, 2021 10:53 am

RP2040 Feather with USB Host

Post by Claude_J_Greengrass »

As far a the RP2040 goes, I'm a newbie. I've been working on UNO, MEGA, and PyGamer boards in 'C'

I tried to follow the instructions here: https://learn.adafruit.com/adafruit-qt- ... cuitpython
using the Blink example. It compiles ok but during the download the Arduino IDE errors:

Sketch uses 10436 bytes (3%) of program storage space. Maximum is 262144 bytes.
Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
Board at /dev/ttyACM0 is not available

The port is ok /dev/ttyACM0 Yes, I'm on linux with ide 1.8.16 The Green led is on and the Red led is blinking
A few seconds after the start of the download the error occurs.

any pointers to get over this initial error would be welcomed

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

Re: RP2040 Feather with USB Host

Post by mikeysklar »

The instructions you linked to are for CircuitPython on a SAMD21 Qt Py board. That is quite difference than the subject of a Feather RP2040 using Arduino.

Are you using the Adafruit Feather RP2040 with USB Type A Host? If so, there is not guide for this brand new board yet, but you can use the Feather RP2040 as a general reference for most fucntionality. In this case you need to use the BOOTSEL button and RESET combination to enter bootloader mode.
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.

The RST pin is can be used to reset the board. Tie to ground manually to reset the board.
Also make sure you have the Phil Hower core installed.

Preferences --> Additional Board Manager URLs:

Code: Select all

https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
Now you are setup to install the board support package.

User avatar
Claude_J_Greengrass
 
Posts: 79
Joined: Sat Jul 24, 2021 10:53 am

Re: RP2040 Feather with USB Host

Post by Claude_J_Greengrass »

I had already updated the Board Manager, but it good to post all the detail. thx

I tried both methods you suggested to enter the bootloader. How down the "boot" button and plug in the RP2040. Or the other method, Hold down the "boot" button and then hit "Reset" button.

In both cases there is no port. If I hit the "Reset" button the red led next to the USB C port starts to blink and the other LED is a solid Green. In this case I can see a port under tools. /dev/ttyACMD but if I attempt to download Blink as per the RP2040 reference, the process starts, but fails during the download with no port being available.

delimma!

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

Re: RP2040 Feather with USB Host

Post by mikeysklar »

That is the behavior for a RP2040 I would expect. I have an Ubuntu box and just plugged mine in using the BOOTSEL hold and plugin / release with the RPI-RP2 drive immediately appearing.

If I hit reset I get a usable /dev/ttyACM0 which also happens just from plugging it in.

Since you have a screaming new board maybe try using the latest Arduino 2.0.x based release + Phil Hower core and see if that helps with uploads.

User avatar
Claude_J_Greengrass
 
Posts: 79
Joined: Sat Jul 24, 2021 10:53 am

Re: RP2040 Feather with USB Host

Post by Claude_J_Greengrass »

I will upgrade to v2.x for the IDE Thanks for the help

User avatar
bbx10node
 
Posts: 147
Joined: Sun Feb 22, 2015 4:14 pm

Re: RP2040 Feather with USB Host

Post by bbx10node »

If you have problems with Linux tty ports try searching https://forum.arduino.cc for "linux port problems".

User avatar
Claude_J_Greengrass
 
Posts: 79
Joined: Sat Jul 24, 2021 10:53 am

Re: RP2040 Feather with USB Host

Post by Claude_J_Greengrass »

I'm working in a weird configuration. Crostini under ChromeOS

RPI-RP2 drive can be seen by the file manager in ChromeOS. No problem there. What don't know and haven't been able to find out, is if that drive is visible under Crostini. What is the full path to RPI-RP2 drive under Linux?

I tired `sudo find / -name RPI-RP2 -print` but there are some permission problems. I may be having them here. Just trying to determine if Crostini is a no-go for RP2040 development.

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

Re: RP2040 Feather with USB Host

Post by mikeysklar »

I've run Crostini and find the extra layer of abstraction to be too much to deal with. Not to say it is impossible, but just one more move in what is already a complicated dance. It would probably be a little easier working with CircuitPython on a Chromebook (closer to the metal) versus Arduino which is yet another layer of abstraction.

On my Ubuntu box my Feather RP2040 in bootloader mode shows up under:

/media/<username>/RPI-RP2
Screenshot from 2023-04-18 12-52-05.png
Screenshot from 2023-04-18 12-52-05.png (55.22 KiB) Viewed 135 times

User avatar
Claude_J_Greengrass
 
Posts: 79
Joined: Sat Jul 24, 2021 10:53 am

Re: RP2040 Feather with USB Host

Post by Claude_J_Greengrass »

I switched machines to get away for Crostini and all the problems it adds to the mix.
I couldn't get Arduino IDE 2.x to run on this old Linux box so I'm using 1.8.19
The RPI-RP2 auto mounts as /media/removeable/RPI-RP2 so that is a confirmation but the following error occurred while trying to download. Also from the CLI I tried to run udisksctl -p /media/removable/RPI-RP2 with the error:
(udisksctl info:16853): GLib-GIO-CRITICAL **: g_dbus_object_manager_get_object: assertion 'g_variant_is_object_path (object_path)' failed
Error looking up object with path /media/removeable/RPI-RP2

I think I'm going to by a cheap box and put a new or relatively new Linux distro on it and try again.

Arduino: 1.8.19 (Linux), Board: "Adafruit Feather RP2040 USB Host, 8MB (no FS), 133 MHz, Small (-Os) (standard), Disabled, Disabled, Disabled, Disabled, None, Pico SDK, IPv4 Only, W25Q080 QSPI /2, Default (UF2)"

Sketch uses 52652 bytes (0%) of program storage space. Maximum is 8384512 bytes.
Global variables use 8960 bytes (3%) of dynamic memory, leaving 253184 bytes for local variables. Maximum is 262144 bytes.
Resetting /dev/ttyACM0
Converting to uf2, output size: 138752, start address: 0x2000
Scanning for RP2040 devices
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
Exception executing udisksctl. Exception: 'module' object has no attribute 'run'
No drive to deploy.
An error occurred while uploading the sketch


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

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

Re: RP2040 Feather with USB Host

Post by mikeysklar »

Do you have a Raspberry Pi around? They work well for development Arduino or Circuitpython with these microcontrollers and you can run a current distro.

User avatar
Claude_J_Greengrass
 
Posts: 79
Joined: Sat Jul 24, 2021 10:53 am

Re: RP2040 Feather with USB Host

Post by Claude_J_Greengrass »

I didn't think of a Raspberry Pi. Could have saved money and got better h/w. Maybe next time.

User avatar
Claude_J_Greengrass
 
Posts: 79
Joined: Sat Jul 24, 2021 10:53 am

Re: RP2040 Feather with USB Host

Post by Claude_J_Greengrass »

Life is too short. I purchased a Pi 4. It arrives in 6-8 days.

Which distro do you run on your Pi.

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

Re: RP2040 Feather with USB Host

Post by mikeysklar »

Adafruit recommends Pi OS current release Bullseye which is what I run on my Pi4's.

User avatar
Claude_J_Greengrass
 
Posts: 79
Joined: Sat Jul 24, 2021 10:53 am

Re: RP2040 Feather with USB Host

Post by Claude_J_Greengrass »

Pi4 arrived. Alive and well and I managed to build a .uf2 file.

Problem: I can't get the Pi4 to recognize the RP2040 USB Host https://www.adafruit.com/product/5723
Hold down the Boot button Then press and release the Reset button. The release the Boot button Then nothing happends! I expected to see an automounted new drive.

Any hints on how to get the Raspberry Pi4 to automount this device so I can copy my UF2 file to it?

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

Re: RP2040 Feather with USB Host

Post by mikeysklar »

I have a new Feather RP2040 DVI board so not identical to your RP2040 with USB Host, but released about the same time.

When I plug it into my Linux box and do the bootloader dance:

hold boot --> tap reset --> release boot I see the RPI-RP2 drive mount.

so...

1) Are you using a known good USB data cable (eg. can you see other devices with it)?

2) Are you logged into a Pi via the desktop which as an automounter? The minimal console installs do not include automounting.

3) Which end of Feather RP2040 USB host are you connected to? The USB-C or USB-A?

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

Return to “Feather - Adafruit's lightweight platform”