1 Reply Latest reply on Oct 16, 2015 1:26 PM by VikramR_26

    Could not write to external flash until erase whole chip

      i everyone,


      I'm using platform N01 with a spi flash running OTA code. However I found an issue when burning image on to external flash.

      I found that sometimes I need to erase whole chip before I could successfully download images to external flash...


      I've checked the code, it appears that it will give erase sector command before every write. Ideally this should work, however I keep seeing "Verify error - Data was not written successfully - abort!" as below




      Destination address: 126976

      Size: 16384


      Done initialising

      Verifying existing data!

      Verifying after write

      Verify error - Data was not written successfully - abort!


      I could download code after given this command:

      .\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -f ./tools/OpenOCD/BCM9WCD1EVAL1.cfg -f ./tools/OpenOCD/stm32f2x.cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_erase SSBWMN01 0" -c shutdown


      My project is using spansion flash, does anyone know how to solve this issue?

      It's pretty inconvenient that I have to manually give command every time I need to update code.