Support with fmc nand flash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 2:54 AM
Hello,
I am running a NAND flash with STM32H7 microcontroller using FMC interface. I have referred to Using the high-density STM32F30xxD/E FMC peripheral to drive external memories datasheet for the programming purpose.
While communicating with the device, I observed that whenever I read the device for the first time I get the desired data. But when I try to access it once again using different command the data section doesn't update. I read the old read data. For example,
If I send the command to read the id for the first time then the ID is properly read. But then when I send the command to read the status register then the old data doesn't get updated.
I even tried to reset the device before each command but the device read register doesn't update. Can you help me with this? What could be the problem?
-Regards
Hrishikesh
- Labels:
-
STM32Cube MCU Packages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 3:01 AM
You'll have to read the documentation more thoroughly and use a logic analyzer on the signals to ensure your understanding matches the signaling presented in reality.
Perhaps look at EVAL board doing the same or similar.
For storage consider eMMC.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 3:02 AM
Hello,
Most probably it's due to the cache. What if you disable it? or just configure the MPU on that region: Strongly Ordered/Or Device?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 3:45 AM
Sorry, I didn't get you exactly. Which parameter are you referring to? Can you please specify with reference to CubeIDE?
Hrishikesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 4:06 AM
In CubeMx. All is in Cortex_M7 menu:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 4:18 AM
Caching at an address level look at ConfigMPU() code examples. Not really expecting the NAND region to be cached/cacheable,
Not much in the way of part# and code to see what might be going astray..
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 4:28 AM
As MPU example
void MPU_Config(void)
{
MPU_Region_InitTypeDef MPU_InitStruct;
/* Disable the MPU */
HAL_MPU_Disable();
/* Configure the MPU as Strongly ordered for not defined regions */
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.BaseAddress = <Put your start address of the memory>;
MPU_InitStruct.Size = <Put your region size>;
MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enable the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
You need to fill in:
MPU_InitStruct.BaseAddress = <Put your start address of the memory>;
MPU_InitStruct.Size = <Put your region size>;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 5:01 AM
OK Thank you for the suggestion. I will implement this.
Hrishikesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 5:06 AM
Yes, I too am not sure how NAND region is going to be affected by caching but can check if this can fix my problem.
Hrishikesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 9:51 PM
Hi,
The method suggested by you didn't work. Is there any other which I should look for?
-Regards
Hrishikesh
