6.1.4.2 Running the Application
- Mount the AVR128DB48 Curiosity Nano host board, the Serial Flash board and the RNWF02 Add On Board on Curiosity Nano base board at respective headers as illustrated in the following figure.
- Connect the debugger USB port on the AVR128DB48 Curiosity Nano board to computer using a micro USB cable
- Open the project and launch MCC with Melody Content Manager Tool
- Configure Home-AP credentials for STA mode, using the Wi-Fi settings configuration. For more details about the Wi-Fi settings configuration, See Figure 3-16
- Generate the code as illustrated below
- Build and program the code to the hardware using MPLAB X IDE
- Open the Terminal application (for example, Tera Term or PuTTY) on the PC
- Connect to the host board COM
port and configure the serial settings as follows:
- Baud: 115200
- Data: 8 Bits
- Parity: None
- Stop: 1 Bit
- Flow Control: None
- Press the SW0 (Soft Reset) button on the host board, see Figure 6-1.
- The board boots up and connect to Home-AP, as per the configurations given in Step 4. After the successful Wi-Fi connection the device opens up a TCP tunnel and wait for the OTA server and firmware image details from the configurator tool.
- Three example sample firmware
binaries are available in the
./ota_demo/tools
folder.- From File explorer,
navigate to the folder (
./ota_demo/tools
) - In the address bar, type cmd and hit enter
- This will open up a terminal window, located in this folder
- Start an HTTP server,
enter
python -m http.server
. By default it will be listening on port 8000
- From File explorer,
navigate to the folder (
- Run the python OTA configurator
tool from the
./ota_demo/tools
folder, as illustrated in the following figure- From File explorer, navigate to the folder
(
./ota_demo/tools
) - In the address bar, type cmd and hit enter
- This will open up a terminal window, located in this folder
- Run the python OTA
configurator by typing
python mchp_configurator.py
. Follow the instructions on the terminal, enter HTTP server IP, port and Image file name to be downloaded by RNWF.Note: Hit Enter when requested to enter IP and port and it will default to the computer IP and port 8000
- From File explorer, navigate to the folder
(
- Now the device creates a HTTP link with the OTA server and starts downloading the image file.
- After successfully downloading the image, the DFU is triggered and firmware is Flashed into the RNWF02 module
- Upon successful DFU, the host will Reset and print the RNWF02 module’s new firmware information