cancel
Showing results for 
Search instead for 
Did you mean: 

NAND memory readback error

tudor.popescu
Associate II

Hello,

I'm using a NUCLEO-L496ZG-P board together with a Samsung K9F1G08U0E nand module. At the moment i'm testing read write operations. For certain values what i read from page differs from what i've written. For instance if i fill page with rand() %0x100 the readback will be wrong but rand() % 0x60 is ok.

I am considering a timing issue. My timings are as follows:

/* ComSpaceTiming */
  ComSpaceTiming.SetupTime = 4;
  ComSpaceTiming.WaitSetupTime = 3;
  ComSpaceTiming.HoldSetupTime = 2;
  ComSpaceTiming.HiZSetupTime = 4;
	/* AttSpaceTiming */
  AttSpaceTiming.SetupTime = 4;
  AttSpaceTiming.WaitSetupTime = 3;
  AttSpaceTiming.HoldSetupTime = 2;
  AttSpaceTiming.HiZSetupTime = 4;

Please respond fast

6 REPLIES 6

> For instance if i fill page with rand() %0x100 the readback will be wrong

How wrong?

JW

tudor.popescu
Associate II

missing bytes, and the crc32 which should be on the last 4 bytes (2044-2047) is located on ~1880 index.

Jan's point is that if things work with a different modulus you should perhaps look more thoroughly at bit patterns to see if you've got some stuck-at issue.

Instead of writing random, write something you can easily observe rather than obscure it with noise.

Make sure it's wired up properly, and perhaps look at some working examples for settings from the EVAL series boards (might need to look to other STM32 families). The error suggests a data bit level issue, so pin connectivity or cross-talk.

Honestly the use of this type of NAND FLASH has been deprecated most places in favour of eMMC

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
tudor.popescu
Associate II

both 0xAA and 0x55 work so I thought there was no data-bias. " and perhaps look at some working examples for settings from the EVAL " - can you please direct me to such examples, I am very new to this. Using Keil v5.

STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\FSMC\NAND

https://www.st.com/en/embedded-software/stsw-stm32054.html

STM32F2-F4_Demonstration_Builder_V1.3.0\Utilities\STM32_EVAL\STM322xG_EVAL\stm322xg_eval_fsmc_onenand.c

https://www.st.com/en/embedded-software/stsw-stm32106.html

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

"stuck at" is not necessarily a stuck at (i.e. short to ground or supply voltage) in this case; rather, any signal issue - open or intermittent signal connection (bad solder joint or connector) and shorts between signals.

But, given "missing bytes" which really sounds alarming, I'd perhaps start to think also about (in)adequate power and grounding, and about signals integrity, especially since you mentioned "Nucleo" and "NAND module". You don't use jumper wires and/or breadboards, do you? What's the OSPEEDR setting of the NAND signals?

JW