1.1.12 SAM E70 Xplained Ultra Evaluation Kit: Building and Running the TWI Bootloader applications
Path of the application within the repository is apps/i2c_bootloader/
To build the application, refer to the following table and open the project using its IDE.
Bootloader Application
Project Name | Description |
---|---|
bootloader/firmware/sam_e70_xult.X | MPLABX Project for SAM E70 Xplained Ultra Evaluation Kit |
Test Application
Project Name | Description |
---|---|
test_app/firmware/sam_e70_xult.X | MPLABX Project for SAM E70 Xplained Ultra Evaluation Kit |
Setting up SAM E70 Xplained Ultra Evaluation Kit
SAM E70 Xplained Ultra Evaluation Kit is used for both Host Development kit and Target Development kit
Connect the TWI SDA line Pin 06 (PA03) on MikroBUS Header of the Host development kit to the TWI SDA line Pin 06 (PA03) on MikroBUS Header of the Target development kit
Connect the TWI SCL line Pin 05 (PA04) on MikroBUS Header of the Host development kit to the TWI SCL line Pin 05 (PA04) on MikroBUS Header of the Target development kit
Connect a ground wire from Host development kit to Target development kit
Connect the Jumper between pin1 and pin2 of J203 header.
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 TWI Host Applications
Using TWI NVM Host application to send the application binary to Target development kit
If the NVM Host Development Kit being used is other than SAM E70 Xplained Ultra Evaluation Kit then follow the steps mentioned in Configuring NVM Host application project
Open the NVM host application project host_app_nvm/firmware/sam_e70_xult.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_sam_e70_xult.h will be programmed on to the Target development kit with default host_app_nvm project configuration
Jump to Running The Application
Using I2C SDCARD Host application to send the application binary to Target development kit
If the SDCARD Host Development Kit being used is other than SAM E70 Xplained Ultra Evaluation Kit then follow the steps mentioned in Configuring SDCARD Host application project
Open the SDCARD host application project host_app_sdcard/firmware/sam_e70_xult.X in the IDE
If a SDCARD host application project of different development kit is used then open that project in the IDE
Build and program the SDCARD host application using the IDE on to the I2C host dvelopment kit
Open the test application project test_app/firmware/sam_e70_xult.X in the IDE
Build the project to generate the binary (Do not program the binary)
Copy the application binary into the SD card and insert the SD card in the SD card slot available on the SAM E70 Xplained Ultra Evaluation Kit
Open the Terminal application (Ex.:Tera Term) on the computer
Configure the serial port settings for Host Development kit as follows:
Baud : 115200
Data : 8 Bits
Parity : None
Stop : 1 Bit
Flow Control : None
Jump to Running The Application
Running the Application
Open the bootloader project bootloader/firmware/sam_e70_xult.X in the IDE
Build and program the application using the IDE on to the Target development kit
LED1 will be turned-on to indicate that bootloader code is running on the target
LED1 will also 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 (Ex.: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,
LED1 of Host development kit will turn on indicating success
The target development kit will be reset. Upon re-start, the boot-loader will jump to the user application
If the test application is programmed then LED1 is off and LED2 should start blinking and you should see below output on the Target development kit console
Press and hold the Switch SW0 to trigger Bootloader from test application and you 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 I2C NVM Host application
To bootload any application other than host_app_nvm/firmware/src/test_app_images/image_pattern_hex_sam_e70_xult.h refer to Application Configurations
Once the application is configured, Refer to Configuring NVM Host application project for setting up the host_app_nvm project
Once done repeat the applicable steps mentioned in Running The Application
Using SDCARD Host application
If multiple Target development kit are to be programmed using the same Host development kit then refer to Configuring SDCARD Host application project
Once done repeat the applicable steps mentioned in Running The Application