rt1052 64MB qspi flash无法下载和运行

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

rt1052 64MB qspi flash无法下载和运行

21,187 Views
echozeng
Contributor III

rt1052+IS25LP512M+IAR:

       如果编译的bin大于16M时,iar flashloader无法烧写成功,如果小于16M则烧写运行正常。

目前推断可能与flash的bank切换有关,iar下如何支持程序大于16M的烧写和运行?

谢谢!

0 Kudos
Reply
17 Replies

20,606 Views
jeremyzhou
NXP Employee
NXP Employee

Hi echo zeng,

非常感谢使用NXP产品,很高兴为你提供技术支持!
请介绍一下你的测试过程和分享烧录失败的错误提示截图。

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

20,606 Views
echozeng
Contributor III

jeremyzhou,你好!

bin文件大于16M时:用usb(烧写bin)和iar flashloader(导入out)烧写失败,iar flashloader烧写后,无法进入debug模式,重新开机后无法启动。

out-bin-sim.png

iar flashlodaer烧写失败log:download-debug-log-1.zip

bin文件小于16M时:usb和flashloadder烧写和启动都正常。

另外,根据IS25LP512M datasheet,访问大于16M的空间需要设置bank选择位或者设置地址为32bit。bootrom是否可以设置或支持32bit qspi访问地址?flash地址截图见附件.

多谢 !

0 Kudos
Reply

20,606 Views
jeremyzhou
NXP Employee
NXP Employee

Hi echo zeng,

感谢回复。

你是指你测试SDK软件包中的bootloader_examples过程中,发现flashloader工程只能成功烧录小于(16M)的application image,超过其大小限制的,就会烧录失败,是这样吗?

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

20,606 Views
echozeng
Contributor III

1,是指用“IAR安装目录下的FlashIMXRT1050_EVK_FlexSPI.out”烧写小于16Mok,大于16M会出现校验错误。

2,如果修改了 “FlashIMXRT1050_EVK_FlexSPI.out”,如何配置xip "flexspi_mem_config_t memConfig"?

       启动时需要将flash切换到32bit地址模式,以下参数如何配置:

   “uint8_t configModeType[3]; //!< [0x01d-0x01f] Configure Mode Type, similar as deviceModeTpe”

   “flexspi_lut_seq_t
    configCmdSeqs[3]; //!< [0x020-0x02b] Sequence info for Device Configuration command, similar as deviceModeSeq”

   “ uint32_t configCmdArgs[3];     //!< [0x030-0x03b] Arguments/Parameters for device Configuration commands”

    谢谢!

0 Kudos
Reply

20,606 Views
jeremyzhou
NXP Employee
NXP Employee

Hi echo zeng,

1) 是指用“IAR安装目录下的FlashIMXRT1050_EVK_FlexSPI.out”烧写小于16Mok,大于16M会出现校验错误。
-- 建议先调整Flash Loader大小,使其与IS25LP512M适应。

pastedImage_1.png
2)4-byte address 可以支持启动设置。

pastedImage_2.png

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

20,606 Views
echozeng
Contributor III

1,flash地址与你截图的一致(我这里多了个--setQE)
2,BOOT_CFG2[2:0]被lcd占用了。
3,可以通过.boot_hdr.conf:flexspi_nor_config_t来配置么?
因为flash默认是24bit的,需要bootrom执行32bit地址设置sequence。

谢谢!

0 Kudos
Reply

20,606 Views
jeremyzhou
NXP Employee
NXP Employee

Hi echo zeng,

感谢回复。

1)flash地址与你截图的一致(我这里多了个--setQE)

-- 你可以把你的截图贴出来我看看,还有再分享一下烧录失败的错误提示截图。

2)可以通过.boot_hdr.conf:flexspi_nor_config_t来配置么?

-- 不可以。

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

20,605 Views
echozeng
Contributor III

jerremyzhou,你好!


1)flash地址与你截图的一致(我这里多了个--setQE)

-- 你可以把你的截图贴出来我看看,还有再分享一下烧录失败的错误提示截图。

通过修改flashloader,已经可以烧写64Mflash,勾选了verify选项,下载完成后不再有错误提示。

2)可以通过.boot_hdr.conf:flexspi_nor_config_t来配置么?

-- 不可以。

为免问题描述不清晰,我再说明一下:64M flash默认寄存器是24位地址,必须修改一个叫bank的寄存器,将其改为支持32位地址 。如果要支持xip启动的话,a,需要bootrom通过boot_hdr.conf中配置的lut sequence来设置这个寄存器使能flash支持32位地址。b,在boot_hdr.conf的lut表中让flexspi接口使能4b(FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x20/*0x18*/)/*0x18=24bit address, 0x20=32bit address*/)(iar flashloader里面是通过SetLUT32b来实现的)
以上实现方式确实不可行么 ?必须用BOOT_CFG[2:0]来实现?

谢谢!

    

0 Kudos
Reply

20,606 Views
jeremyzhou
NXP Employee
NXP Employee

Hi echo zeng,

感谢你的回复。

Q1) 好的,就是说现在是可以成功下载了哦,但是代码没有启动上来对吗?

Q2) 在查看FlexSPI Memory Configuration结构后,没有可以用于执行以下command sequence的设置。

pastedImage_1.png

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

20,606 Views
echozeng
Contributor III

jeremyzhou,你好!

        1),修改iar flashloader后可以下载,可以跑起来,但跑起来与16M flash对比,非常(动态图形界面)卡,是否是因为没有进入QPI模式?

        2),我留意到:FlexSPI Memory Configuration,有几个参数:是否可以利用起来:

                           .deviceModeCfgEnable = true,
                           .deviceModeType = 1,//Quad Enable command
                           .deviceModeSeq.seqNum = 1,
                           .deviceModeSeq.seqId = 4,
                           .deviceModeArg = 0x000040,

               这是用于设置QE使能的是sequence。

               但还有一组参数:看起来与上述功能一致,可能也是可以利用的,但我不太清楚 怎么使用:

                                   uint8_t configModeType[3];

                                   flexspi_lut_seq_t configCmdSeqs[3];

                                   uint32_t configCmdArgs[3];

               以上两组参数,bootrom是如何执行的?谁先谁后?

              configModeType:“Configure Mode Type, similar as deviceModeTpe”,而deviceModeType的注释是“Specify the configuration command type:Quad Enable, DPI/QPI/OPI switch ! Generic configuration, etc.“这个参数如何取值?

            能否帮忙说明一下,多谢!

               

0 Kudos
Reply

20,606 Views
jeremyzhou
NXP Employee
NXP Employee

Hi echo zeng

请先发给flexspi_nor_config_t的配置,我先帮你看看。

这样讨论起来比较有效率一点。

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

20,606 Views
echozeng
Contributor III

jeremyzhou,你好!

            见附件。

0 Kudos
Reply

20,606 Views
jeremyzhou
NXP Employee
NXP Employee

Hi echo zeng

感谢回复。

在查看了附件后,我发现你是想通过如下设置,但是正如参考手册222页提到的,LUT表内的command sequence顺序是已经定义好了的,你不能随意更改。

建议是使能Customized LUT sequence,自己添加Fig 1所示对应的command sequence。

                           .deviceModeSeq.seqNum = 1,
                           .deviceModeSeq.seqId = 4,
                           .deviceModeArg = 0x000040,

pastedImage_1.png

Fig 1

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

20,606 Views
echozeng
Contributor III

uint8_t lutCustomSeqEnable; //!< [0x047-0x047] LUT customization Enable, it is required if the program/erase cannot
//! be done using 1 LUT sequence, currently, only applicable to HyperFLASH,目前hyperFlash才能用,qspi flash呢?

你说的使能“Customized LUT sequence”与上面的冲突了,麻烦确认。

谢谢!

0 Kudos
Reply

20,606 Views
jeremyzhou
NXP Employee
NXP Employee

Hi echo zeng,

感谢回复。

参考手册没有备注这个信息,但是保守起见我会向AE team求证一下后再回复你。

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

15,895 Views
SpoonMan
Contributor IV

...so? 

How is it possible to send 0xB7 command during XIP initialization? Someone could help understanding how deviceModeSeq and configCmdSeqs are intended to be used for such purpose, if so? Please?

0 Kudos
Reply

15,778 Views
SpoonMan
Contributor IV
Bump.
0 Kudos
Reply