cancel
Showing results for 
Search instead for 
Did you mean: 

how i can create file .flm for w25q128 and set the setting in keil

Fadi.Albaghdadi
Associate III

I have tried a lot in creating a FLM file as well as how to configure the necessary settings in the Keil program. I am using w25q128 serial memory with quadspi protocol with stm32f746igt processor

Use this method because the processor is low on memory

#quadspi #w25q128

13 REPLIES 13

Do you have your own BSP code which works successfully with the W25Q128 in your system? That supports, read, write, erase, etc?

How well tested is that? Can you write a .BIN or .HEX from the UART to the QSPI Flash successfully? I would generally get all that working properly before trying to port it into a .FLM file.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Yes it works well and use this example

Try this https://github.com/cturvey/stm32extldr/blob/main/f7_w25q128/CLIVEONE-W25Q128_STM32F7XX-PB2-PB6-PF8-PF9-PF6-PF7.flm

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Unfortunately it did not work ever. Since Keil cannot see the file that you sent me to try it. Can I have the basic program that generates the memory code?

struct FlashDevice const FlashDevice = {

  FLASH_DRV_VERS,       // Driver Version, do not modify!

  "W25Q128 Flash",  // Device Name 

  EXTSPI,           // Device Type

  0x10000000,         // Device Start Address

  0x01000000,         // Device Size in Bytes (256kB)

  4096,            // Programming Page Size

 // 0,             // Reserved, must be 0

  0xFF,            // Initial Content of Erased Memory

  200,            // Program Page Timeout 100 mSec

  3000,            // Erase Sector Timeout 3000 mSec

// Specify Size and Address of Sectors

  0x001000, 0x000000,     // Sector Size 4kB (4096 Sectors)

  SECTOR_END

};

I tried to generate the keil program code it sees but it does not work Are the settings correct

Updated file, should be recognized now

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
#ifdef USE_W25Q128
KeepInCompilation struct FlashDevice const FlashDevice  =  {
   FLASH_DRV_VERS,             // Driver Version, do not modify!
   "CLIVEONE-W25Q128_STM32F7XX-PB2-PB6-PF8-PF9-PF7-PF6",   // Device Name
   EXTSPI,                     // Device Type
   0x90000000,                 // Device Start Address
   0x01000000,                 // Device Size in Bytes (16MB)
   256,                        // Programming Page Size
   0,                          // Reserved, must be 0
   0xFF,                       // Initial Content of Erased Memory
   100,                        // Program Page Timeout 100 mSec
   3000,                       // Erase Sector Timeout 3000 mSec
 
// Specify Size and Address of Sectors
   0x010000, 0x000000,         // Sector Size  64kB (256)
   SECTOR_END
};
#endif // USE_W25Q128

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

After adding the file .flm to the program and pressing OK, it will disappear from the list automatically

https://github.com/cturvey/stm32extldr/blob/main/f7_w25q128/CLIVEONE-W25Q128_STM32F7XX-PB2-PB6-PF8-PF9-PF6-PF7.flm

0693W00000APKsXQAX.pngafter 0693W00000APKshQAH.png

0693W00000APKykQAH.png

I'll set up a Nucleo and test later.

Try renaming to TEST.FLM

Change the RAM allocation to 0x4000

5.33 Didn't appear to be losing the the algorithm

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..