0 Replies Latest reply on Oct 8, 2020 1:23 AM by SudheeshK_26

    External Memory Bootloader using an un-configured SCB block

    SudheeshK_26

      Summary

      This example project shows how to use an unconfigured SCB block as UART in the bootloadable project and as SPI master during bootloading process. This method can be used when all the available SCB blocks are used in the bootloadable project for UART communication and wants to implement an external memory (SPI) bootloader. This project will configure the SCB block for UART communication initially and re-configure it as SPI master when bootloader starts. Already available “NOR Flash Bootloader” project is modified to use an un-configured SCB block.

      Changes made to the already available “NOR Flash Bootloader” project is explained below. Please refer the documentation for “NOR Flash Bootloader” for more details about how external memory bootloader project works.

       

      Requirements

      Design Tool: PSoC Creator 4.3

      Programming language: C

      Associated devices: All PSoC4 BLE devices

      Required hardware: This project is tested with CY8CKIT-042-BLE-A Bluetooth® Low Energy 4.2 Compliant Pioneer Kit and S25FL064L Serial NOR flash.

       

      Connections

      SCB SPI connections between Flash and PSOC

      MOSIP0[0]
      MISOP0[1]
      SCLKP0[3]
      CSP0[2]

      SCB UART connections

      RXP0[0]
      TXP0[1]

      Dedicated UART Connections

      TXP1[5]

       

      PSoC Creator Schematic

      PSoC_Creator_Schematic.PNG

       

      Output

      SCB block will be configured as UART when the bootloadable starts and print a message in UART terminal saying that, SCB is successfully configured for UART communication.

      Message from dedicated UART block

      UART1.PNG

      Message from SCB configured as UART

      UART2.PNG

      When bootloader starts, the unconfigured SCB block will be re-configured as SPI master. Immediately after starting the SCB block as SPI master, device ID is read from flash to verify that SCB block is successfully configured as SPI master. This project is tested with S25FL064L and the device ID for this flash device is 0x01, 0x60 and 0x17.

      Message after SCB is configured as SPI master.

      UART3.PNG