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
But when I run the example, when run Qspi_Ip_EraseBlock() in main.c
it runs into Qspi_Ip_WriteEnable(),
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!
Solved! Go to Solution.
I've missed the READ instruction in the Read Status Register-1 sequence. The problem was solved already.
I've missed the READ instruction in the Read Status Register-1 sequence. The problem was solved already.
What is your /WP pin connection?
Hi,
Thank you for your reply!
The /WP(IO2) pin of Flash is connected to PTD12 of S32K344 currently.
If so, do you drive this pin to logic 0?
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:
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.