FlexSPI AHB bus access during Secondary Boot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FlexSPI AHB bus access during Secondary Boot

1,026 次查看
spthx
Contributor II

I am using an i.MX8M Nano EVK (8MNANOD3L-EVK) and I am doing Read access to Flash memory via AHB bus.
The base address is set to 0x0800_0000.

This worked fine, but when booting with Secondary Image Boot, the behaviour was unintended.

When the Secondary Image Offset is 4 MB (0x0040_0000), when Read access is made to 0x0800_1234 to read the data at address 0x1234 in Flash memory, the data at position 0x0040_1234 in Flash is read out.

Is there a register or something in FlexSPI that sets the offset for AHB bus access?
Could somebody kindly shed some light on why this is happening?

Kind regards,

标签 (1)
0 项奖励
回复
3 回复数

858 次查看
AldoG
NXP TechSupport
NXP TechSupport

Hello,

I would like to confirm the following, from your post I understand that when booting from secondary image it does not boot?
Or is it booting but you are attempting to read after booting?

If later could you share how are you testing this?
Also, please share the uboot version that you are working with.

Best regards/Saludos,
Aldo.

0 项奖励
回复

847 次查看
spthx
Contributor II

Thanks for the reply.

The latter.
Booting with the secondary image is successful.
(Booting from Flash with FlexSPI 3B Read boot mode).

However, in this case, reading Flash memory after boot is buggy.

The testing procedure is as follows:
1) issue a Page Program command to write some data to Flash memory.
    Assume that the address of the written Flash is 0x1234.

2) read back whether the data was written correctly.
     Because QSPI is mapped to 0x0800_0000~ in the memory space of A53, Access 0x0800_1234 and read back the data.

3) check if the data written in step 1 matches the data read back in step 2.
    If booting with a secondary image, this verification will fail.
    This is because access to 0x0800_1234 is not to Flash address 0x1234, but to 0x0040_1234 for some reason (for secondary image offset 0x0040_0000).

I am using uboot-imx based on lf-6.1.22-2.0.0, but only using SPL.
The above tests are done using FreeRTOS.

Best Regards,

 

0 项奖励
回复

1,002 次查看
spthx
Contributor II

Boot mode is FlexSPI 3B Read, booted from Flash.

0 项奖励
回复