1 Reply Latest reply on Jun 28, 2019 1:56 AM by GeonaP_26

    Firmware update from Flash


      Hi all,

      I'm working on a project  using CY8C5287AXI-LP095 under PSoC Creator 4.1

      My application receives a basic set of commands from UART

      The communication interface is based on 485/MODBUS protocol.

      We are looking for a strategy to include the firmware update over Modbus.

      Since 89% of the flash memory is unused  and no external Eeprom is available, presumably the whole image of the firmware update could be stored in a dedicated area of flash.


      In summary:

      1) The new firmware is received from UART and stored in a dedicated area of flash.

      2) When the transfer is completed, we set a flag for the bootloader and the we reset our system.

      3) The Bootloader finds a new firmware available, so starts the update process reading from the flash area.

      4) After a reboot the firmware has been updated .


      Now my questions are:

      How can I reserve a dedicated area of flash?

      Is it possible to introduce any kind of memory protection, in order to prevent the unintentional firmware corruption?

      Regarding the Bootloader, may I write my custom API functions for updating the firmware from flash?


      Any sugestion or clarification will be very appreciated.




        • 1. Re: Firmware update from Flash
          1. Bootloader supports Custom Interface option to add bootloader support to any communication component which supports command and response. You can find more details in chapter: ‘Adding Bootloader Support (Advanced)’ of Component Author Guide.
          2. Bootloader performs bootloadable checksum validation to ensure integrity. If the user application updates flash content this will lead to checksum mismatch. Bootloadable Checksum Exclude Section option allows user to specify the size of flash which needs to be excluded for bootloadable checksum validation. User can use this area of flash for placing flash variables or Em_EEPROM which changes the flash content during runtime.
          3. PSoC 4 supports different types of flash row level protection such as Unprotected, Factory Upgrade, Field Upgrade and Full Protection. To disable external read operations in PSoC 4, please enable device protection settings to ‘Protected’ in cydwr settings and program the hex file using PSoC Programmer. You can find more details in section: Flash Protection of AN73854.