1 Reply Latest reply on Aug 30, 2013 9:46 AM by jesusantoniocar

    PSoC 4 Pioneer Kit Community Project#085 – UART Bootloader in PSoC 4

    cy.wbz

      Hello!

       

      In today’s example we will wade into the often confusing swamp of Bootloaders. We’ve touched on the bootloader in an earlier example in this series, when we discussed the dual ARM chip design of the Pioneer board. In that example we showed the user how to bootload a new project into the PSoC 5LP device.

       

      In this example we will show case how to create a PSoC 4 based UART bootloader. In the example we will use the PSoC 5LP and the USB-UART capability to bootload code into the PSoC 4 over the UART protocol. We will include an example project and a host application that users can utilize to bootload their new project into the PSoC 4.

       

      While this example may not be as useful with the Pioneer kit, as it has a programmer onboard, it can be extremely valuable in using the Pioneer kit to bootload new code into a device on a custom PCB board that does not have a programmer onboard.

       

      001 - Schematic Design.png

       

      Forum Post Attachments:

       

      At the bottom of this post we are including the following items:

      • Example Project Zip File
      • Project Images

       

      Components Used: 

       

      The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

      • PWM
      • UART
      • Bootloader
      • CyPins
      • CyClock

       

      Firmware Description:

       

      The main.c firmware is included in the example project. Please review the commented sections for more details.

       

      In this example we have included an application note that discusses bootloaders, how the UART bootloader works, and walks the user through creating a bootloadable project, and a new project that can be bootloaded into the target device.

       

      At the bottom of the post we have included the example projects, host GUI source code, and the application note.

       

      In the example we will use the onboard three color LED to show that new code has been loaded into the PSoC 4. In the base example we will flash the red LED. We will then use the Bootloader GUI to load in new code over the UART bridge. The new code will then flash the green LED. We have a second project that will then flash the blue LED. While the functionality of the examples is a simple flashing LED, we are showing the user how to utilize and implement a UART bootloader for their PSoC 4 device.

       

      The application note for the UART PSoC 4 bootloader can be found at the following web page:

       

      PSoC 3, 4, 5LP UART Bootloader

       

      Hardware Connections:

       

      Simply connect the UART lines from the PSoC 5LP (P12.6 and P12.7) to the PSoC 4 device header (P0.0 and P0.1).

       

      Test Your Project:

       

      Program the Pioneer board with the UART Bootloader example. Then use the UART Bootloader GUI to update the application code on the PSoC 4. See that the flashing LED changed from the Red to the Green or Blue.

       

      I hope this example can help you in your design.

       

      Best,

      Matt