LS1043A QSPI access problem

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

LS1043A QSPI access problem

ソリューションへジャンプ
2,472件の閲覧回数
Might-Lee
Contributor III

Platform: LS1043a target board

LSDK: flexbuild_lsdk2004_update_290520.tgz

QSPI FLASH: S25FS512SDSMFI011

 

I tried to program the data into QSPI by using CodeWarrior and then dump the data to verify that it successfully programmed. Then SD boot the system to read the correspond data in QSPI over command “sf read” to compare the read value between these two ways, I found they are different.

 

I tried to program the image to QSPI on SD boot. Then dump the image to verify by using CodeWarrior. I found the dump data is wrong which is not the same as the image I sent.

 

The SD boot is established with the commands below:

“flex-builder -m ls1043atgb -b sd”

and

“flex-installer -f firmware_sdboot.img -d /dev/sdc”

For now, the ERASE, READ and PROGRAM commands can be successfully executed to QSPI over CodeWarrior and verified all data is correct, but not for operation on SD boot. The QSPI clock frequency measured in the CodeWarrior environment is about 33MHz. The QPSI clock frequency on SD boot is 50MHz. Could this error be caused by the difference QSPI clock speed?

I tried to use the following two ways to slow down the QSPI clock, but the clock speed is still the same as the original 50MHz.

1. According to the instruction of sf probe in U-BOOT, the speed of QSPI flash can be set in the third argument.

MightLee_0-1626977169797.png

Command is sf probe 0:0 20000000

2. Form the DTS file in U-BOOT, adding spi-max-frequency=20000000.

DTS file

&qspi {

        bus-num = <0>;

        status = "okay";

 

        qflash0: s25fs512s@0 {

                #address-cells = <1>;

                #size-cells = <1>;

                compatible = "jedec,spi-nor";

                spi-max-frequency = <20000000>;

                reg = <0>;

        };

};

 

I have two questions below need to clarify.

  1. How to modified the QPSI clock?
  2. How to successfully read/write QSPI FLASH in SD boot?
0 件の賞賛
返信
1 解決策
2,421件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

On ls1043aqds, QSPI is supported, we have verified there is no problem at QSPI flash reading and writing.

You could do your porting based on LS1043AQDS to generate firmware image with the following command.

$ flex-builder -i mkfw -b sd -m ls1043aqds

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
2,398件の閲覧回数
Might-Lee
Contributor III

It was based on the older LSDK version which is version lsdk2004_update_290520. I generated the SD boot with the LSDK version lsdk2012, but the image below shows the baud rate was changed when it ran to BL31. The baud rate is correctly output at 115200 before BL31, then I measured the waveform it became 178000 after BL31. The image below shows the CPU frequency is incorrect. I'm sure I use the same RCW value as the older SD boot. So, the RCW value should be correct, apart from the RCW value, is there anything I need to modify?

MightLee_0-1627493098617.png

MightLee_1-1627493108652.png

 

 

0 件の賞賛
返信
2,345件の閲覧回数
Might-Lee
Contributor III
0 件の賞賛
返信
2,457件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

You could modify the value of register 0x157015c via RCW PBI command.

$ flex-builder -c rcw -m ls1043ardb

In RCW source code, please edit packages/firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600_sdboot.rcw to add the following line.

.pbi
write 0x57015c, 0x20100000
.end

Rebuild RCW

$ flex-builder -c rcw -m ls1043ardb

0 件の賞賛
返信
2,447件の閲覧回数
Might-Lee
Contributor III

I have done the modification with your suggestion, but it seems the commands is to modify the speed for RCW/PBI fetch. Besides, the default setting on LSDK is already at low speed of 4.7MHz.

What we need to modify is the speed under U-BOOT process which modified the speed from the default frequency of 50MHz to 30MHz.

Is there any other way to modify the correspond speed?

0 件の賞賛
返信
2,422件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

On ls1043aqds, QSPI is supported, we have verified there is no problem at QSPI flash reading and writing.

You could do your porting based on LS1043AQDS to generate firmware image with the following command.

$ flex-builder -i mkfw -b sd -m ls1043aqds

0 件の賞賛
返信
2,349件の閲覧回数
Might-Lee
Contributor III

It is fixed with LSDK 20.12.

0 件の賞賛
返信