RT1050: How to program OCTAl Flash on Keil

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1050: How to program OCTAl Flash on Keil

1,477 Views
jimmychiang
Contributor II

Hi Sir.

    I know that if want to download firmware to Octal flash through the Keil Software Development Kit, that need a .FLM program algorithm.

   Actually, I have download "MIMXRT1052_DFP" on NXP website. This package have provided "MIMXRT105x_HYPER_256KB_SEC.FLM","MIMXRT105x_QSPI_256KB_SEC.FLM", but did not provide about OCTA flash program algorithm.

   So where can I get the OCTA flash program algorithm? Or have any document descriptions and generate this file? Or where can I get the source code of "MIMXRT105x_HYPER_256KB_SEC.FLM" and "MIMXRT105x_QSPI_256KB_SEC.FLM", maybe I can reference this source code to create OCTA flash program algorithm? 

Thanks!

Labels (1)
Tags (1)
0 Kudos
2 Replies

982 Views
ohmjke
Contributor II

Hello.

I have a similar question.

We are using RT1024 with Keil MDK and MIMXRT1024_QuadSPI_4KB_SEC.FLM
The problem is programming speed too low (via JLink + SWO).

I suppose it because .FLM uses 4kB sectors despite on-chip "Winbond W25Q32JV" supports also 32 and 64kB sectors.
According to Flash datasheet erase time for 4kB sector - 45ms, and 150ms for 64kB.
If we using 4kB it will take 45*16=720ms to erase 64kB instead of 150ms.
And I think overhead with 4kB sectors on extra SWO-transactions is more compare to 64kB option.

For source codes of "MIMXRT105x_HYPER_256KB_SEC.FLM"  one can apply to keil support.

As far as I know Keil do not implements *.FLM but MCU manufacturer does it (i.e. NXP in this case).
Can you confirm or refute it?

Of course we can implement our own *.FLM, but it would be much easier to just correct a few lines of code in the existing algorithm.

Thank you.

UPD:

I forgot to mention that "erase" is not the only problem - "programming" has the same issue.
I can see in Keil's progress bar size of chunks - 256 bytes.
It is equals to "page size" of Winbond memory, but FLM allows to set "szPage" field of "struct FlashDevice" to multiple of the real minimum programming size (to increase speed).
For example piece of code for the STM32L0:

struct FlashDevice const FlashDevice = {
  FLASH_DRV_VERS, // Driver Version, do not modify!
  "STM32L0 8KB Flash", // Device Name
  ONCHIP, // Device Type
  0x08000000, // Device Start Address
  0x00002000, // Device Size in Bytes (8kB)
  1024, // Programming Page Size (program several half pages at once)
  0, // Reserved, must be 0
  0x00, // Initial Content of Erased Memory
  500, // Program Page Timeout 500 mSec
  500, // Erase Sector Timeout 500 mSec

  // Specify Size and Address of Sectors
  0x080, 0x000000, // Sector Size 128B (64 Sectors)
  SECTOR_END
};

0 Kudos

1,223 Views
igorpadykov
NXP Employee
NXP Employee

Hi chiang 

one can check keil documentation for creating new flash algorithm

Flash Programming 

and nxp app notes for flash programming

i.MX RT1050 crossover processor| Arm Cortex-M7|NXP 

Flashloader examples

Programmers (Flash, etc.) (1)
Flashloader i.MX-RT1050

https://www.nxp.com/products/processors-and-microcontrollers/applications-processors/i.mx-applicatio...

For source codes of "MIMXRT105x_HYPER_256KB_SEC.FLM"  one can apply to keil support.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos