1.1.10 PIC32WM BZ6 Curiosity Evaluation Board: Building and Running the CAN Bootloader Applications
Downloading and Building the Application
To clone or download this application from Github, go to the main page of this repository and then click Clone button to clone this repo or download as zip file. This content can also be download using content manager by following these instructions.
Path of the application within the repository is apps/can_bootloader/.
To build the application, refer to the following table and open the project using its IDE.
Bootloader Application
| Project Name | Description |
|---|---|
| bootloader/firmware/pic32wm_bz6_curiosity.X | MPLAB X Project for PIC32WM BZ6 Curiosity Evaluation Board |
Test Application
| Project Name | Description |
|---|---|
| test_app/firmware/pic32wm_bz6_curiosity.X | MPLAB X Project for PIC32WM BZ6 Curiosity Evaluation Board |
Hardware Required
| Name | Quantity |
|---|---|
| PIC32WM BZ6 Curiosity | 1 |
| SAM E54 Xplained Pro | 1 |
| ATA6563 Click board | 1 |
Setting Up PIC32WM BZ6 Curiosity Evaluation Board
- PIC32WM BZ6 Curiosity Evaluation Board
is used for both Host development kit and Target development kit

- Insert ATA6563 Click board in the mikroBUS 1 connector of PIC32WM BZ6 Curiosity evaluation board
- Connect SAM E54 Xplained Pro evaluation kit to PIC32WM BZ6 Curiosity evaluation board as per the pin connections shown below
- Connect the CANL on CAN Header of the Host development kit to the pin 2 on ATA6563 Click board of the Target development kit
- Connect the CANH on CAN Header of the Host development kit to the pin 7 on ATA6563 Click board of the Target development kit
- Connect a ground wire between the Host development kit and Target development kit
- Connect the Debug USB port on the Host development kit to the computer using a micro USB cable
- Connect the Debug USB port on the Target development kit to the computer using a micro USB cable
Building and Configuring CAN Host Applications
Using CAN NVM Host Application to Send the Application Binary to Target Development Kit

If the NVM Host development kit being used is other than PIC32WM BZ6 Curiosity evaluation board then follow the steps mentioned in Configuring NVM Host Application Project.
- Open the NVM host application
project host_app_nvm/firmware/sam_e54_xpro.X in the IDE.
- If a NVM host application project of different development kit is used then open that project in the IDE
- Build and program the NVM
host application using the IDE on to the Host development kit.
- The prebuilt test application image available under host_app_nvm/firmware/src/test_app_images/image_pattern_hex_pic32wm_bz6_curiosity.h will be programmed on to the Target development kit with default host_app_nvm project configuration
- Jump to Running the Application.
Running the Application
- Open the bootloader project bootloader/firmware/pic32wm_bz6_curiosity.X in the IDE.
- Build and program the application
using the IDE on to the Target development kit.
- RGB_LED_RED will be turned-on to indicate that bootloader code is running on the target
- RGB_LED_RED will turn on when the bootloader does not find a valid application; i.e., the first word of the application (stack pointer), contains 0xFFFFFFFF
- If the test application is being
programmed, open the Terminal application (e.g., Tera Term) on the computer and
configure the serial port settings for Target development kit as follows:
- Baud: 115200
- Data: 8 Bits
- Parity: None
- Stop: 1 Bit
- Flow Control: None
- Press the Switch SW0 on the Host development kit to trigger programming of the application binary.
- Once the programming is
complete:
- LED0 on the Host development kit will be turned on indicating success
- The Target development kit need to be reset. Press the NMCLR switch, the bootloader will jump to the user application.
- If the test application
is programmed then RGB_LED_RED should start blinking and the user should
see below output on the Target development kit console

- Press and hold the Switch USR
BTN1 to trigger Bootloader from test application and the user should see
below output.

- Press Reset button on the Host development kit to reprogram the application binary.
- Repeat Steps 4-5 once.
- This step is to verify that bootloader is running after triggering bootloader from test application in Step 6
Additional Steps (Optional)
Using CAN NVM Host Application
- To bootload any application other than host_app_nvm/firmware/src/test_app_images/image_pattern_hex_pic32wm_bz6_curiosity.h, refer to the Application Configurations
- Once the application is configured, refer to the Configuring NVM Host Application Project for setting up the host_app_nvm project
- Once done repeat the applicable steps mentioned in Running the Application
