Flash memory test library generated from Processor Expert

cancel
Showing results for 
Search instead for 
Did you mean: 

Flash memory test library generated from Processor Expert

480 Views
arturoarteaga
Contributor II

Hi,

I wanted to know if there are any libraries with functions that allow to test the flash memory during startup or cyclically every certain period of time for 32 bit uC, in order to detect any one bit error and most of the two bit errors of the program copies and the data stored in the volatile flash memory.

If this library exists with these testing functions, I would also like to ask you whether it is possible to generate it using the Processor Expert tool in KDS from a specific component generated by the component library.

If it is not possible to generate it by means of Processor Expert can you please tell me another way where I can find this library with these functions or how could I develop a function to make a similar test of the flash memory?

Thanks a lot,

Regards,

Arturo Arteaga

Labels (1)
0 Kudos
7 Replies

278 Views
arturoarteaga
Contributor II

Hi Kerry,

I want to check all flash memory with code and dates.

You tell me that there are verify funtion for IDEs that read out the programmed flash area, and compare it with the code which you has been write. Which functions are there that you mention?

Could you please be kind to show me an example with functions of a library?

Thanks a lot for your help.

Have a great day too.

Arturo Arteaga

0 Kudos

278 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Arturo Arteaga,

1. Flash code check

  Take an example, MDK associated with JLINK, when you download the code, there has a item: verify code download

pastedImage_1.png

  If you don't use MDK IDE, just use JLINK with JFLASH to download the code, it also have the verify function:

pastedImage_3.png

So, if you just want to check the application code, I suggest you to verify it after download the code.

2. We don't have the lib which can check the whole flash(include the application code) in the code.

As you know, the flash contains the code area and blank flash area, code area, I think you can check it when you downloade the code, other blank flash area which you want to use it by calling the code, you can erase that flash sector, check the flash area data, whether it is 0XFF or not, then write the flash area, read it out, compare with the data you have written.

All these can be realized by the flash erase, write, read, these functions can be found in the C90TFS which I give you before.

Wish it helps you!

Have a great day,
Kerry

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

278 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Arturo Arteaga,

    I don't know what the 32 bit MCU you are using, if you want to test the flash, I think you can use the code, program the data, then read it out, and compare with the data which you have programmed, then to check whether the flash data is correct or not.

   So, you can use the flash code, now give you some standard software driver for your reference.

   Please refer to our C90TFS driver:

https://cache.nxp.com/downloads/en/device-drivers/C90TFS-FLASH-DRIVER-DEVD.exe?fsrch=1&sr=1&pageNum=... 

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

278 Views
arturoarteaga
Contributor II

Hi Kerry,

Sorry, I forgot to tell you the 32 bit MCU. Our MCU is MK20DX256VLH7. I'm going to look up C90TFS driver but I would be grateful if you could please give me a similar solution for MK20DX256VLH MCU or a solution for a similar microcontroller that could be worth with MK20DX256VLH7.

Thanks a lot for your help.

Regards,

Arturo Arteaga

0 Kudos

278 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Arturo Arteaga,

   Actually,   MK20DX256VLH7 can refer to the MK20DX256xxx7 project, which you can find it in the C90TFS folder:

Standard Software Driver v1.0.4\C90TFS\Demos\build\MK40DX256xxx7

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

278 Views
arturoarteaga
Contributor II

Hi,

Thanks for send me the library for MK20dx256. One question:

Do you Know where I can find a funtion or a file where I can check the flash memory at start up or periodically in the run time. I want to Know if there is corrupt memory at the start up or if this is OK.

Thanks a lot for your help.

Regards,

Arturo Arteaga

0 Kudos

278 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Arturo,

  Do you want to check all the flash memory or just some area?

  As you know, if the MCU is start up, it will run the application code.

1  If you want to check the programmed area, actually, when you download the code, a lot of IDE have the verify function, this function is used to read out the programmed flash area, and compare it with the code which you has been write, if it is not the same, it means the download have problems, it also can check the flash area.

2. if you just want to check the flash area which don't have the program code, you can write the flash write and read code in the application code to check it, but take care, before you write the programmed flash area, you need to erase it at first.

You can add the flash write and read code in the start up file.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos