RomApi Erase&Page Program Error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RomApi Erase&Page Program Error

ソリューションへジャンプ
1,129件の閲覧回数
Bkaya
Contributor III

Hello Everyone,

In my application, i am using external Nor flash. I run my code from XiP then i want to configure flash section like 0x3000 0000 + (Bootloader) and 0x3040 0000 - (EEprom). Therefore, i imported SDK example which is "evkbmimxrt1170_fsl_romapi_cm7". I used everything same even pin initialize in example. I just changed some Lut commands and .option0.U = 0xC0000005U. When i run code, i get Vendor ID successfully. After that, example calls ROM_FLEXSPI_NorFlash_Erase() function and my program crashes. Error is 7001 "Sequence execution timeout error occurred during FLEXSPI transfer"

(Some informations in my app:  AT25SF321B is my external Nor Flash.

SerialNorTotalSize = 0x400000 , SerialNorSectorSize = 0x1000,  SerialNorPageSize = 0x100, FLEXSPI_BASE = 0x30000000, SECTOR_INDEX_FROM_END = 2 )

Here is my questions:

1) My flash size is 4MB so 0x400000 is end adress. In example, Erase function use address 0x3FE000 but reference manuel says flexspi starts from 0x30000000 + 0x400000(flash size). Therefore, should we send 0x303FE000  to erase function?

Bkaya_1-1708003478037.png

2) While testing my code, i sent 0x3FE000 address to write 256 bytes(1 page) buffer. After function call, function assigns buffer's value to right address but my program crashes. I did not figure out what causes that yet.

Bkaya_0-1708069664606.pngBkaya_2-1708069730411.png

Bkaya_3-1708069794970.png

3) ROM_FLEXSPI functions are function pointer. I did not find any explanation about functions. In reference manuel, functions are just copy-pasted. Is there any documentation?

4) I do not know that i set correst Lut sequence for erase function. Page program, read command etc. mentioned in reference manuel but there is not erase command. Can you check my Lut?

5) As i mentioned above, can i split flash sections with ROM_FLEXSPI functions?

6) I want to check memory after function calls. Hence, can i debug this example?

I share my config below and i realy need help about Error => "7001 - Sequence execution timeout error occurred during FLEXSPI transfer". 

 

Best Regards,

Basri KAYA

0 件の賞賛
返信
1 解決策
986件の閲覧回数
Bkaya
Contributor III

Disable irq and check the datasheet of flash. It works fine. If anyone has problem, i can help. 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
987件の閲覧回数
Bkaya
Contributor III

Disable irq and check the datasheet of flash. It works fine. If anyone has problem, i can help. 

0 件の賞賛
返信
1,036件の閲覧回数
zakaria
Contributor II
about Error => "7001
the function ROM_FLEXSPI_NorFlash_Erase() does not require an aboslute address of the area you want to erase, but an address relative to the base address of the FlexSPI. thats what the Error indicates me
0 件の賞賛
返信