2 Replies Latest reply on Nov 4, 2014 3:14 PM by nikvh

    Run code from SPI Flash?

    kwolfe81

      Hi all,

       

      First: I'm new to both Wiced & STM's processor lines - but have both targeted for my next project.  Sorry if this is obvious.

       

      My Question: Is there a way to run program code directly out of SPI flash?  My program will incorporate WiFi and is likely going to be >512kB.  It seems that the existing bootloader setup copies external NVM to internal NVM, and then boots from there, but it would be a lot simpler to just run out of external memory (yes, I can take the performance hit, and no, I don't mind writing custom OTA stuff).  Further, we're trying to keep costs down, and the 128kB verisons of the STM32 line are much cheaper than the 1MB versions.

       

      Thanks!

       

      - Kevin

        • 1. Re: Run code from SPI Flash?
          kwolfe81

          Looks like this might be more of an STM question - and I'd need to use the FSMC to do it (along with changing a lot of the WICED MCU support code).  Has anyone done anything similar?

          • 2. Re: Run code from SPI Flash?
            nikvh

            This is an STM question and as far as I know most microcontrollers do not support running from external SPI flash due to the limited bandwidth. There are some microcontrollers that support quad-SPI flash memories which can run at impressive rates however that is not a standard embedded system design.

             

            The STM32F4xx platform has support for the FSMC peripheral and we have an audio demonstration platform that utilizes it to communicate with external PSRAM. This can be found in  WICED/platform/MCU/STM32F4xx/peripherals/platform_ext_memory.c.