Check WEL bit fail in Qspi_Ip_Example_S32K344

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

Check WEL bit fail in Qspi_Ip_Example_S32K344

ソリューションへジャンプ
5,111件の閲覧回数
FelixQi
Contributor III

The version information of the example is as below:

* Autosar Version : 4.7.0
* Autosar Revision : ASR_REL_4_7_REV_0000
* Autosar Conf.Variant :
* SW Version : 3.0.0
* Build Version : S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331

 

The Serial Flash I use is W25Q16. I've attached the Datasheet as attachment.

I've configured the Mem LUT Operand in below table of ConfigTools:

Write Enable is 06h and Read Status Register-1 is 05h

FelixQi_0-1723536821803.png

FelixQi_1-1723536866860.pngFelixQi_2-1723536893974.pngFelixQi_3-1723536920511.png

But when I run the example, when run Qspi_Ip_EraseBlock() in main.c

FelixQi_4-1723537152600.png

it runs into Qspi_Ip_WriteEnable(),

FelixQi_5-1723537253658.png

After /* send WREN command */, when /* check WEL bit */, the WEL is expected to be 1, but it is read as 0. So the program runs into Mem_ExFls_ExampleAssert().

Is there any wrong configuration or do I miss some important configuration? Expect to your reply. Thanks!

タグ(1)
0 件の賞賛
返信
1 解決策
4,865件の閲覧回数
FelixQi
Contributor III

I've missed the READ instruction in the Read Status Register-1 sequence. The problem was solved already.

元の投稿で解決策を見る

6 返答(返信)
4,866件の閲覧回数
FelixQi
Contributor III

I've missed the READ instruction in the Read Status Register-1 sequence. The problem was solved already.

5,068件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

What is your /WP pin connection?

 

davidtosenovjan_0-1723642866094.png

 

0 件の賞賛
返信
5,047件の閲覧回数
FelixQi
Contributor III

Hi,

Thank you for your reply!

FelixQi_0-1723684800815.png

FelixQi_1-1723684880713.png

The /WP(IO2) pin of Flash is connected to PTD12 of S32K344 currently.

 

0 件の賞賛
返信
5,036件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

If so, do you drive this pin to logic 0?

0 件の賞賛
返信
4,990件の閲覧回数
FelixQi
Contributor III

Hi,

I don't drive this pin to logic 0 in source code.

I've measured this pin by oscilloscope and it keeps logic 1 during the whole process.

I also tried not connecting this pin, but still meet the same problem.

 

Besides, I've tried another command "Read JEDEC ID". Below is the sequence in the Flash User Manual:

 
 

Sequence of Read JEDEC ID.PNG

 After I send the read command, I could measure there is data output through DO.

But all data in ReadData keep as 0 after running below  API:

qspiStatus = Qspi_Ip_RunReadCommand(instance, 21, 0U, ReadData, NULL_PTR, 3U);//Read JEDEC ID

 

21 is the LUT index of ReadDeviceId:

/* 21: ReadDeviceId */
(Qspi_Ip_InstrOpType)((Qspi_Ip_InstrOpType)QSPI_IP_LUT_INSTR_CMD | (Qspi_Ip_InstrOpType)QSPI_IP_LUT_PADS_1 | (Qspi_Ip_InstrOpType)159U),
(Qspi_Ip_InstrOpType)(QSPI_IP_LUT_INSTR_STOP)

 

It seems that the Flash could response the command but the S32K344 could not read correctly.

I've not sure where the problem exists.

 

 

0 件の賞賛
返信
4,982件の閲覧回数
FelixQi
Contributor III
I've noticed that the value of register QUADSPI->RBDR[0] remains 0x00000000 all the time.
0 件の賞賛
返信