hello sir,
We are facing software related problem with project .
Problems are related to flash memory of MKM34Z256VLQ7.
Now we successfully able to access the flash and save data with creating memory blocks.
But at the time of erase memory block individually, The whole memory with all blocks are erase same time.
As per our application, Memory of single block has to clean and update as per the function used.
Please see attachment which include sample code which we have used.
Please help related problem as soon as possible .
Hi Ravindra Balsaraf,
I have test our SDK flash project in our TWR-KM34Z75M board, it works OK, TWR-KM34Z75M chip is just MKM34Z256VLQ7, the same chip as you.
1. Please download the newest SDK code from this link:
Welcome | MCUXpresso SDK Builder
Chose the TWR-KM34Z75M board, then generate the code and download it.
2. open the project in folder: SDK_2.2_TWR-KM34Z75M\boards\twrkm34z75m\driver_examples\flash
3. Please check my following test result, you can find sector erase is correct, it won't erase the whole flash block.
You can find other flash address also have data, so the flash sector erase works OK.
I have checked your code, you have the following definition:
uint32_t pflashBlockBase = 0; //Defined
uint32_t pflashTotalSize = 0x40000; //Defined
uint32_t pflashSectorSize = 0x100; //Defined and all these values are stored in *value by switch case
Please note, the Flash sector size in MKM34Z256VLQ7 is 2KB, it is 0X800, you can't define it as 0x100, even you define it as 0x100, it will still erase the 0x800 flash sector.
Please check the reference manual:
So, I highly recommend you check the KSDK sample code on your side directly.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
thanks sir,it was very very hel[pful.
we resolved the issue right now.thanks once again prompt support
Hi Ravindra Balsaraf,
That's very good to hear your problem is solved!
If you don't have any other question about this topic, please help to mark the correct answer, just to close this question, thank you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------