Check WEL bit fail in Qspi_Ip_Example_S32K344

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

Check WEL bit fail in Qspi_Ip_Example_S32K344

Jump to solution
5,108 Views
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!

Tags (1)
0 Kudos
Reply
1 Solution
4,862 Views
FelixQi
Contributor III

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

View solution in original post

6 Replies
4,863 Views
FelixQi
Contributor III

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

5,065 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

What is your /WP pin connection?

 

davidtosenovjan_0-1723642866094.png

 

0 Kudos
Reply
5,044 Views
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 Kudos
Reply
5,033 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply
4,987 Views
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 Kudos
Reply
4,979 Views
FelixQi
Contributor III
I've noticed that the value of register QUADSPI->RBDR[0] remains 0x00000000 all the time.
0 Kudos
Reply