RN4020 Device Firmware Update (UART)

 Objective

The RN4020 Device Firmware Update (DFU) Utility can be used to perform a firmware update on the RN4020 Bluetooth Low Energy module using a wired connection over the Universal Asynchronous Receiver Transmitter (UART) interface. This utility can be used for both RN4020 firmware upgrade and downgrade needs. As with any DFU process, a firmware upgrade should be handled carefully to avoid unrecoverable damage to the device.

If an upgrade fails for any reason, keep the RN4020 module alive and try to recover by applying the DFU process again. The following conditions must be met when the RN4020 module performs a DFU through the UART:

  • UART hardware flow control (RTS/CTS) must be used.
  • No UART communication other than streaming the DFU image.
  • No Radio Frequency (RF) communication attempts. All other operations during a DFU period should be avoided.
  • While the DFU is in progress, RN4020 should not be disconnected and the DFU process should not be interrupted. If the DFU process is interrupted the RN4020 module might end up bricked.
  • Use a valid Microchip released RN4020 DFU (BIN) file only. Using an invalid DFU (BIN) file will result in a bricked module.
  • This utility cannot be used to unbrick the module.
  • If the module gets bricked please contact a Microchip Sales Representative to get the issue resolved.

 Materials

Hardware Tools

Tool About Purchase
RN-4020-PICTAIL-50px.png
RN-4020-PICTAIL
RN4020 Bluetooth Low Energy PICtail™/PICtail Plus

Software Tools

This lab requires the following software tools:

 Connection Diagram

The RN4020 DFU Utility must be able to enter commands that place the RN4020 into UART DFU mode. Flow control must also be used! The following signal connections are required at a minimum:

rn4020-dfu-uart-connection.png

If the RN4020 module UART signal lines are connected to a host MCU, we advise placing the host MCU in reset (via a grounding jumper wire connected to the MCLR pin) to relinquish control of these lines during the DFU process.

 Procedure

1

Connect the RN4020 PICtail™ to a Microsoft® Windows PC using a USB Mini-B cable.

Connected1.png

2

Wait for the RN4020 PICtail to enumerate as a Serial Port device successfully.

3

After the RN4020 PICtail enumerates as a Serial Port device, open the Device Manager on your Windows PC and note down the COM port number assigned to the RN4020 PICtail under Ports.

DeviceManager.png

Note: The COM port number may be different on your machine.

4

Run the RN4020 DFU Utility (RN4020DFUUtility.exe) on the Windows PC. The DFU Utility can be downloaded from the Microchip website. It is located under Documentation > Software > RN4020 Firmware vx.xx Update.

DFU1.png

5

Ensure that the RN4020 PICtail is still connected to the Windows PC and successfully enumerated. Click the Scan button to scan for all the UART COM ports available on the Windows PC.

DFU2.png

Ensure that the COM port on which the RN4020 PICtail is enumerated is not already open by another application like a Serial Terminal application.

6

Click on the drop down menu of the UART COM Port and select the correct COM port, which is assigned to the RN4020 PICtail to be firmware updated.

DFU3.png

7

A set of DFU files for the released versions of the RN4020 firmware are provided. Choose the desired DFU file from the DFU File drop down menu. The RN4020 DFU BIN files available as of March 2016 are listed below. Newer ones may be made available as time goes on:
DFU File Name Release Version
RN4020_123_080715_DFU.bin 1.23.5 08/07/2015
RN4020_120_120914_DFU.bin 1.20 12/09/2014
RN4020_110_060914_DFU.bin 1.10.9 06/09/2014
DFU4.png

Be sure to use a valid Microchip released RN4020 DFU (BIN) file only. Using an invalid DFU (BIN) file will result in a bricked module.

8

With the RN4020 PICtail still connected, COM port and valid DFU file selected, click the Update button to start the RN4020 DFU update process.

DFU5.png

The progress bar shows the progress of the DFU process.

DFU6.png

9

After the DFU process is complete, an information dialog window pops up to inform you of a successful DFU.

Success.png

After the DFU is successful, the RN4020 will be in the factory default state.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.