KL16 mcu SPI read/write NandFlash failure

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

KL16 mcu SPI read/write NandFlash failure

332 Views
junwang1
Contributor II

I use below code to read ID of external NandFlash . The code is generated under KDS's PE tool.Every operation returns a wrong result. 0xFF, 0xC8.   The right result should be 0xC8, 0xD4.  I test sck output wave, should output 32 clock  pulses, but really only output 16 clock pulses. 

....................................

txbuf[0] = 0x9F;

txbuf[1] = 0x00;

SM2_ReceiveBlock(SM2_DeviceData, recv_buf, 2);

SM2_SendBlock(SM2_DeviceData, txbuf, 2);

  while (!SM2_GetBlockReceivedStatus(SM2_DeviceData))

  {

  SM2_Main(SM2_DeviceData);

  }

.....................

Labels (1)
0 Kudos
1 Reply

221 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

can you please upload your demo project for this issue?


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos