Note:
The PC software "Silicon Labs Serial Bootloader Data Source" source code (Visual C#) 
and installer (setup.exe) are included as part of AN533SW.zip. This software is required for 
this bootloader framework. 
This can be downloaded from: http://www.silabs.com/products/mcu/Pages/ApplicationNotes.aspx

1.	CAN Bootloader  Demonstration Steps

1.1.	Items needed for the demo

*	This demo uses the C8051F500 Target Board as the demonstration platform. 
*	Wall power supply to power the board.
*	A USB Debug Adapter and the Silicon Labs IDE or the MCU Production Programmer utility for initial programming of the bootloader firmware.
*	USB cable to connect the CP2102 USB-to-UART Bridge on the C8051F500 Target Board to the PC.

1.2.	Labels used in this document

*	Master MCU  The C8051F500 MCU on Side A of the C8051F500 Target Board.
*	Target MCU  The C8051F502 MCU on Side B of the C8051F500 Target Board.
*	Data Source  The Serial Bootloader Data Source PC Application.
*	Target Bootloader Firmware  The code that is programmed once to the target MCU. This is done via C2 programming using the Silicon Labs IDE and a USB Debug Adapter.
*	Application Firmware  The code that on the target MCU to perform end application. This firmware is initially delivered to the target MCU via CAN, and can be updated via CAN.

1.3.	Hardware Setup

1.	Connect wall power to the C8051F500 Target Board via the DC power jack (P4).
2.	For programming, connect the USB Debug Adapter to either DEBUG A or DEBUG B connectors as necessary.
3.	Ensure that the following shorting blocks are in place on the board:
a.	Header J17: CAN_RX, CAN_TX, UART_RX, UART_TX
b.	Header J19: Switch and LED
c.	Header J26: CAN_RX, CAN_TX, UART_RX, UART_TX
d.	Header J11: Switch and LED

 
1.4.	Software and Firmware Setup

1.	Extract all files from the zip package to a folder on a Windows PC.
2.	Use the Silicon Labs IDE to download the Target MCU Bootloader Firmware to the Target MCU (Side B). This firmware will be resident on the Target MCU, and will then be able to receive the application firmware over CAN. This firmware is pre-built, with the hex file available here: \Target_BL_FW\F50x_CAN_Target_BL_FW.hex
Note: In the IDE, connect to the MCU and use the Debug > Download Object File option to download the hex file to the MCU.
3.	Use the Silicon Labs IDE to download the Master MCU Bootloader Firmware to the Master MCU (Side A). This firmware will issue commands to the data source (PC) and the target MCU to program the firmware.
4.	If you do not have Virtual COM Port (VCP) device drivers for the CP2102 USB-to-UART bridge installed on your PC, do so now by downloading the driver from here: http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
5.	Now, disconnect the USB Debug Adapter from the Target Board and connect the USB cable between the target board and the PC.
6.	A Virtual COM Port will be now available on your PC. Use Windows Device Manager to check the COM port number and note down.
7.	Launch the Serial Bootloader Data Source PC application setup from here: \Source_BL_SW\Release\setup.exe
8.	Once the application is installed, it will be automatically launched. A start menu shortcut will also be available for future use.

 
1.5.	Demonstration Steps

1.	The C8051F500 Target Board should be now loaded with the Master Bootloader Firmware on Side A and Target Bootloader Firmware on Side B. The PC Application should be installed on the PC. Power the target board and connect the USB cable for the Virtual COM Port.
2.	Launch the Serial Bootloader Data Source PC application by going to Start Menu > Silicon Laboratories > Silicon Labs Serial Bootloader Data Source.
3.	Click the Select Hex File button and choose the Version 1.0 of the Target Application Firmware available here: \Target_App_FW_Ver1\F50x_CAN0_LED1_Blinky.hex
4.	The hex file is processed and the extracted application information is shown in the table view of the PC application.
5.	Select the COM port number of the Target Boards Virtual COM Port from the drop-down box. The other port settings are pre-selected and need not be changed.
6.	Click the Open COM Port button.
7.	On the Target Board, press the P1.4_A push-button switch on Side A to start the bootloading process. The bootload process cannot be initiated from the PC application because it is acting as a slave data source.
8.	Follow the prompts shown by the PC application to complete the bootload process. At the end of this process, the application firmware will be running on the Target MCU and you should see the LED P1.3_B on Side B blinking at a moderate rate. 
9.	Now, to demonstrate firmware update to a new version, click the Select Hex File button and choose the Version 1.1 of the Target Application Firmware available here: \Target_App_FW_Ver1_1\F50x_CAN0_LED1_Blinky.hex
10.	Press the P1.4_A push-button switch on Side A to start the bootloading process. 
Follow the prompts shown by the PC application to complete the bootload process. At the end of this process, the new version of the application firmware will be running on the Target MCU and you should see the LED P1.3_B on Side B blinking at a much faster rate. This is the update in the Version 1.1 of the application firmware (for demonstration purposes). 
