2018-09-07 02:21 AM
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
2018-09-07 04:40 AM
> For instance if i fill page with rand() %0x100 the readback will be wrong
How wrong?
JW
2018-09-07 05:14 AM
missing bytes, and the crc32 which should be on the last 4 bytes (2044-2047) is located on ~1880 index.
2018-09-07 06:29 AM
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
2018-09-07 07:20 AM
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.
2018-09-07 09:31 AM
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
2018-09-07 01:07 PM
"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