2024-06-06 06:36 AM
Hello,
Can anyone help me with interfacing NAND flash with STM32H7 microcontroller? I am unable to find any reference guide or application note related to the same.
-Regards
2024-06-06 07:45 AM
Hello,
Unfortunately there is no AN for NAND Flash using STM32H7.
May I propose the old application note: AN2784 "Using the high-density STM32F10xxx FSMC peripheral to drive external memories " / Section 4 "Interfacing with an 8-bit NAND Flash memory". H7 and F1 don't have the same architecture and the version of the FMC interface but it could give you an idea of how to interface the NAND flash with an STM32.
You can also inspire from STM3210E-EVAL board BSP implementation from here: https://github.com/STMicroelectronics/stm3210e-eval-bsp/blob/6b36c9912e39594ef9fba24d1e218b8dc3e62a2d/stm3210e_eval_nand.c
2024-06-06 07:56 AM
But please also note that, unlike eMMC, for example, simple NAND flash does not contain wear levelling, so you will have to programme this yourself. You shouldn't underestimate the effort involved and, like most users, you will probably end up simply using eMMC because everything is already implemented there.
There used to be a rudimentary software example for wear levelling from NAND, but it is completely outdated and therefore no longer usable.
Good luck!
/Peter
2024-06-06 08:21 AM
Well that, and the fact the eMMC has a more standardized foot print so is less likely to get randomly EOL'd in a form-factor that's unique, or incompatible across vendors.
Also the ERASE BLOCK size is unhelpfully large for NAND's on smaller MCU. ECC syndrome generation / checking is frequently done on the chips these days, based on the geometry/structure, but actual correction of the data needs to be hosted locally.
Half the battle with the NAND's will be to READ THE DOCUMENTATION, the STM32 side is merely one of address decoding, and access to the command and data portals into the NAND itself, and that's not where the complexity is.
Determine if NAND is appropriate for your use case. This is not stated in the question, nor the anticipated capacity.
There are also QSPI NAND Flash devices, that might be easier to interface with less pins.
2024-06-07 02:19 AM
Thank you for this suggestion. Will take care before proceeding
2024-06-07 03:27 AM
Thank you for the advice. I will see to it while implementing
2024-06-12 07:01 AM
Hello @HDesa.1 ,
Need to be sure how you did accept the solution in this thread? could you please explain how @Peter BENSCH 's comment does answer your original question (HW/Software)? you're looking for a reference design HW/Software and Peter answer is talking about wear leveling which is something to take care after implementing what you asked for.
2024-06-12 09:43 AM
You've done this to a couple of threads. The scoring / success metrics on the forum are awful. Forums in general have problems with closure.
I suspect there's a "That's more complicated than I thought.." moment. Or "I'm going to have to do a lot of heavy lifting on this task"
ie the boss or some colleague has said "Use NAND Flash" to solve this, and wandered off, because they used it in some Embedded Linux use case, or it's large / cheap in a cost per byte sense.
I think what Peter and I have done, is say this is a bad idea, if you want simple do something simpler... Look at what you want to achieve, let us suggest how to get to THAT destination. We also provide a degree of cover for junior employees to question their senior's, ie some random guy on the interwebs said it was a bad idea, and ducks..
Half the battle on forums is to "break focus" / "tunnel vision", people come in with one idea, or keep repeating the symptoms, and need to look elsewhere, or the cause of the issue.
2024-06-12 10:09 AM - edited 2024-06-12 10:21 AM
@Tesla DeLorean wrote:
You've done this to a couple of threads. The scoring / success metrics on the forum are awful. Forums in general have problems with closure.
Sorry but there is no relation with scoring/metrics. The goal is not to serve the members but also the other (new) members looking for the original question. I'm not against any other further "advanced answers" - contrarily - it enriches the discussion/knowledge but we need to be more accurate for selecting answers.
PS: I unmarked many of my comments that were marked as solution by members because I assumed they don't answer their original questions ;) ..
2024-06-13 04:51 AM
Hello,
My point was to consider the suggestion provided by @Peter BENSCH. I could have accidently accepted it as a solution. I have removed it after seeing your message.
Apologies for the confusion
-Regards