Getting to know the Nano R4, but experiencing issues. This just cropped up intermittently. Windows 10 64 bit, Arduino IDE is up to date, no hub involved, happens with multiple cables.
Generally the Nano shows up as Com8, I can upload and view the serial monitor just fine. Then for some reason not readily apparent to me, the IDE reports that upload fails with error 74.
I can then switch to Com1 and upload, sometimes I have to put the Nano into bootloader mode manually, sometimes I actually have to close the serial monitor before it will upload.
But then the serial monitor does not work. I can then switch to Com8 to get the serial monitor to work. More often than not, then I cannot upload using Com8, so it’s back to the lather, rinse, repeat, cross your fingers and say a hail Mary to upload any changes to the sketch.
As I stated, it’s hit or miss. Just now I plugged the Nano in and both serial monitor and uploads are working on Com8.
When I look at Windows device manager, it shows up as DFU-RT Port (at least at this moment.
Sorry, that was no help. I was hoping for more than the same AI response that Google spews.
I can get the sketch to upload by switching to COM1 (generally… sometimes I have to unplug the USB and plug it back in.
The issue is that I cannot read the serial monitor unless I switch to COM8, then I have to switch back to COM1 to upload, then back to COM8 to watch the serial monitor.
To clarify:
When I pull down the board display at the top of the IDE, I see two ports:
Arduino Nano R4 - COM1
Arduino Nano R4 - COM8
Those are the only ports that are available if I go into the board manager as well.
Here’s what I get when I upload a sketch:
Opening DFU capable USB device...
Device ID 2341:0074
Run-Time device DFU version 0101
Claiming USB DFU (Run-Time) Interface...
Setting Alternate Interface zero...
Determining device status...
DFU state(0) = appIDLE, status(0) = No error condition is present
Device really in Run-Time Mode, send DFU detach request...
Device will detach and reattach...
Opening DFU USB Device...
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0101
Device returned transfer size 64
Copying data from PC to DFU device
I am on a MAC, so if the MAC works and Windows doesn't, the problem is Windows.
I can select normal Arduino port and by double clicking the button I can select the DFU port. Both upload fine. The DFU ends and returns the port to normal USB
I can post all the output but it is working and I also get a port switch at the end. It works a bit different with Device Manager, but I dont think it is an issue. Maybe someone else with the same board on Windows can test and verify.
Here is my output with normal Arduino port selected which is closest to yor scenario.
Thanks for the clarification. The port of the Nano R4 board is surely COM8. The board selector menu on the Arduino IDE toolbar remembers the board model you manually selected for a port that is not automatically identified, so the COM1 port may be labeled as "Arduino Nano R4" in the menu even though it is not in any way related to the Nano R4 hardware.
Please provide the full verbose output from a upload attempt that fails due to you having COM8 selected. I'll provide instructions you can follow to do that:
This procedure is not intended to solve the problem. The purpose is to gather more information.
Wait until the board goes into the state where uploads are failing.
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to Show verbose output during: ☑ compile in the "Preferences" dialog.
Check the box next to Show verbose output during: ☐ upload.
Click the "OK" button.
The "Preferences" dialog will close.
Attempt an upload, as you did before when it failed (do not select COM1 before attempting the upload).
Wait for the upload to fail.
You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
Open a reply here on this forum topic by clicking the "Reply" button.
Click the <CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Sketch uses 42468 bytes (16%) of program storage space. Maximum is 262144 bytes.
Global variables use 4032 bytes (12%) of dynamic memory, leaving 28736 bytes for local variables. Maximum is 32768 bytes.
"C:\Users\rperr\AppData\Local\Arduino15\packages\arduino\tools\dfu-util\0.11.0-arduino5/dfu-util" --device 0x2341:0x0074,:0x0374 -D "C:\Users\rperr\AppData\Local\arduino\sketches\87BCC9FA2834AFFB3DCEDA9025D30226/variable.speed.stepper.ino.bin" -a0 -Q
dfu-util 0.11-arduino4
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Opening DFU capable USB device...
Device ID 2341:0074
Run-Time device DFU version 0101
Claiming USB DFU (Run-Time) Interface...
Setting Alternate Interface zero...
Determining device status...
Failed to retrieve language identifiers
Failed to retrieve language identifiers
error get_status: LIBUSB_ERROR_TIMEOUT
Failed uploading: uploading error: exit status 74
2. Install your board's Package Core, it contains the board's driver.
Now reflash bootloader:
The steps below are for flashing bootloader to the Nano R4 board. Before carrying out the steps, ensure that:
A. you install the Nano R4 board’s package core as described in the Nano R4 User Manual.
B. In your computer, locate the "dfu_nano.hex". To find this, navigate to: "C:\Users\YourWindowsUserName\AppData\Local\Arduino15\packages\arduino\hardware\ renesas_uno\1.X\bootloaders\NANOR4". Copy this path.
C. Install the latest version of the Renesas flash programmer (download page) and once installed, open it.
Flashing steps:
Short the BOOT and GND pins found on the Nano R4
Connect Nano R4 board to the computer via USB.
Create "New Project" by clicking on "File"
For Project Information, select "RA" for Microcontroller, add "Project Name" and Select "Project Folder" file location.
On the connected "Nano R4" board via USB, press the "Reset" button once to make sure the yellow "LED_Builtin" LED is OFF. Only the Power(PWR) LED should be ON for the next steps below.
For Tool, select "COM Port" (for Tool Details' "Num" you should see the COM Port your board is connected to).
Click "Connect". If successful, you should see "Operation completed." If operation fails, repeat steps #1-8.
Under "Operation", for "Program Files" select the "dfu_nano.hex" path as described in "B" above.
Click on "Start" button to flash the bootloader.
Remove the jumper wire used to short BOOT and GND pins and then press the reset button on the Nano R4 once to reset the board.