Skip to content

Commit 5147541

Browse files
committed
Content update (initial commit)
1 parent e206f32 commit 5147541

File tree

2 files changed

+99
-0
lines changed

2 files changed

+99
-0
lines changed
1.35 MB
Loading

content/hardware/03.nano/boards/nano-r4/tutorials/01.user-manual/content.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,6 +2242,105 @@ When working with HID on the Nano R4, there are several key points to keep in mi
22422242
- The Nano R4 can function as both a keyboard and mouse simultaneously, allowing for complex automation sequences that combine typing, shortcuts and mouse control.
22432243
- Remember that different operating systems may have slightly different keyboard layouts and shortcuts, so test your HID projects on your target platform to ensure compatibility.
22442244

2245+
## Bootloader
2246+
2247+
The Nano R4 board features a built-in bootloader that enables sketch uploading directly from the Arduino IDE without requiring external programming hardware. The bootloader is a small program stored in a protected area of the RA4M1 microcontroller's flash memory that runs each time the board powers on or resets. It manages the critical communication between your computer and the board during sketch uploads, making the development process simple and accessible.
2248+
2249+
During normal operation, when you connect your Nano R4 to your computer and upload a sketch, the bootloader receives the new program data via USB and writes it to the appropriate memory location. This process happens automatically and transparently, allowing you to focus on developing your projects rather than managing low-level programming details.
2250+
2251+
### Understanding the Bootloader Operation
2252+
2253+
When the Nano R4 board resets or powers on, the bootloader performs the following sequence:
2254+
2255+
1. **Initialization**: The bootloader initializes the USB communication and checks for incoming programming commands
2256+
2. **Wait Period**: It waits briefly for new sketch data from the Arduino IDE
2257+
3. **Program Execution**: If no new sketch is received, it jumps to your previously uploaded program
2258+
2259+
This automatic process ensures that your board is always ready to receive new sketches while maintaining quick startup times for your applications.
2260+
2261+
### Bootloader Recovery
2262+
2263+
In certain situations, the bootloader may become corrupted or stop functioning properly. Common symptoms of bootloader issues include:
2264+
2265+
- The board is not recognized by the Arduino IDE
2266+
- Upload attempts fail with timeout errors
2267+
- The board appears as an unknown device in your computer's device manager
2268+
- The onboard LEDs behave abnormally during connection attempts
2269+
2270+
The Nano R4 includes a special hardware feature for bootloader recovery: the `BOOT` pin. This pin, when connected to ground (`GND`) during power-up, puts the board into a special programming mode that allows you to restore the bootloader using the Renesas Flash Programmer tool.
2271+
2272+
![The Nano R4 BOOT pin (top view)](assets/boot-pin.png)
2273+
2274+
***__Important note__: The `BOOT` pin is located on the bottom side of the board and is clearly labeled. This pin should only be used for bootloader recovery or advanced programming operations. During normal use, leave this pin unconnected.***
2275+
2276+
### Technical Specifications
2277+
2278+
The Nano R4's bootloader offers the following technical specifications:
2279+
2280+
| **Parameter** | **Value** | **Notes** |
2281+
|:----------------:|:------------------------:|:----------------------------------------:|
2282+
| Recovery Method | `BOOT` pin + `GND` | Hardware recovery mode activation |
2283+
| Bootloader File | `dfu_nano.hex` | Included with Arduino UNO R4 Boards core |
2284+
| Programming Tool | Renesas Flash Programmer | Official tool for bootloader recovery |
2285+
2286+
### Bootloader File Location
2287+
2288+
The bootloader file (`dfu_nano.hex`) is automatically installed with the Arduino UNO R4 Boards core. You can find it in the following locations:
2289+
2290+
**Windows:**
2291+
2292+
```bash
2293+
C:\Users\[YourUsername]\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\[version]\bootloaders\NANOR4\
2294+
```
2295+
2296+
**macOS:**
2297+
2298+
```bash
2299+
~/Library/Arduino15/packages/arduino/hardware/renesas_uno/[version]/bootloaders/NANOR4/
2300+
```
2301+
2302+
**Linux:**
2303+
2304+
```bash
2305+
~/.arduino15/packages/arduino/hardware/renesas_uno/[version]/bootloaders/NANOR4/
2306+
```
2307+
2308+
***Replace `[YourUsername]` with your actual username and `[version]` with the installed core version number.***
2309+
2310+
### When to Consider Bootloader Recovery
2311+
2312+
Bootloader recovery should be considered when:
2313+
2314+
- Standard troubleshooting steps (different cables, USB ports, driver reinstallation) have failed
2315+
- The board was working previously but stopped being recognized after a failed upload
2316+
- Power was interrupted during a sketch upload
2317+
- You need to restore the board to factory programming state
2318+
- The board is not responding to the reset button normally
2319+
2320+
### Bootloader Recovery Tutorial
2321+
2322+
For detailed step-by-step instructions on recovering and reflashing the bootloader on your Nano R4 board, please refer to our **[Nano R4 Bootloader Recovery and Flashing Tutorial](https://docs.arduino.cc/tutorials/nano-r4/bootloader-flashing/)**. This tutorial the following:
2323+
2324+
- Preparing your board for bootloader flashing
2325+
- Installing and configuring the Renesas Flash Programmer tool
2326+
- Step-by-step flashing process
2327+
- Verifying successful bootloader restoration
2328+
- Troubleshooting common issues
2329+
2330+
***__Important note__: Bootloader recovery is a low-level operation that should only be performed when necessary. ___Always ensure you have a stable power supply and follow the tutorial instructions carefully to avoid damaging your board__. If you're unsure whether you need bootloader recovery, try standard troubleshooting steps first or contact [Arduino Support](https://www.arduino.cc/en/contact-us/) for assistance.***
2331+
2332+
### Maintaining Bootloader Health
2333+
2334+
To minimize the risk of bootloader corruption and ensure reliable operation, we recommend the following:
2335+
2336+
- **Always allow uploads to complete**: Never disconnect the USB cable or remove power during sketch uploads
2337+
- **Use quality USB cables**: Poor quality or damaged cables can cause communication errors
2338+
- **Ensure stable power**: Use a reliable power source when uploading sketches
2339+
- **Keep the Arduino IDE updated**: Newer versions often include improvements to the upload process
2340+
- **Handle the board carefully**: Avoid static discharge and physical damage to the board
2341+
2342+
The bootloader is a critical component that makes the Nano R4 board user-friendly and accessible. While it's designed to be robust and reliable, understanding its operation and recovery options ensures you can always restore your board to working condition if issues arise.
2343+
22452344
## Support
22462345

22472346
If you encounter any issues or have questions while working with your Nano R4 board, we provide various support resources to help you find answers and solutions.

0 commit comments

Comments
 (0)