MPC5643 data flash?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5643 data flash?

2,606 Views
Lundin
Senior Contributor IV

I am wondering whether the MPC5643L will have any data flash or not? This is a very important feature for me, as my products require configuration in runtime, and as external memories aren't feasible to use in safety-critical applications. The "datasheet" only mentions the following: 

•Sectorization: 16 KB + 2 × 48 KB + 16 KB + 2 × 64 KB + 2 × 128 KB + 2 × 256 KB 
• EEPROM emulation (in software) within same module but on different partition 

Should I interpret that as "there is no data flash and the minimum amount of flash that needs to be deleted prior writing is 16k" ? 

If so, will I be able to execute the flash writing routine from flash or must I upload the code in RAM? (Which would be a completely unacceptable practice for the safety-critical applications this MCU was designed for) 

If so, are there any plans of including data flash / eeprom for another derivate which will have the same safety features as MPC5643?

0 Kudos
Reply
7 Replies

862 Views
Lundin
Senior Contributor IV

Ok I got a reply from Freescale support confirming my suspicion.

 

How a MCU can be suitable for safety-critical automotive applications, without on-chip data flash / eeprom is completely beyond me. As I strongly doubt cars will suddenly overnight stop having user configurations, service counters, data logging, customer adaptions etc etc... how is everyone planning to solve this? 

 

- Stacking 16k of NVM data into RAM at runtime? Not b****y likely.

- External eeprom in safety-critical applications? Umm okay... has someone suddenly released pre-qualified eeprom circuits?

 

0 Kudos
Reply

862 Views
tektronix
Contributor II

Hello Daniel,

What was the reply of the freescale?

I mean can we save data in the FLASH from with in the program running from the FLASH and SRAM? As decribed int datasheet we can but only in some part right?

*Sectorization: 16 KB + 2 × 48 KB + 16 KB + 2 × 64 KB + 2 × 128 KB + 2 × 256 KB

• EEPROM emulation (in software) within same module but on different partition

0 Kudos
Reply

862 Views
Lundin
Senior Contributor IV

You can run code from one flash segment and erase/program code in another different segment. The chip is however unable to do so with any hint of real-time performance, as you must erase the whole segment, and while doing so you have to save the whole segment in RAM. And in case you need to fulfil the SIL requirements, you need block replication, 2 flash segments = double the erase/program time.

0 Kudos
Reply

862 Views
Lundin
Senior Contributor IV

Further correspondance with Freescale reveals an app note called "EEPROM emulation with MPC5500 family microcontrollers".

 

It contains an obfuscated, highly questionable algoritm where you use the whole 16k segment as a huge FIFO, with another 16k segment as "swap-in" when the first one is filled. Equals a minimum of 32k of flash.

 

Even if someone would manage to implement that algoritm together with necessary safety mechanisms, such as CRC and block replication, the access time of the data will still be laughable. As it is impossible to index or sort the data in any way, the only search algoritm that can be used is a linear one. Meaning that in worst case you'll have to go through (16k - 8) bytes of data to find the one you are looking for. Needless to say, this can't be used in any application with the faintest hint of real-time requirements.

 

A few years back I did actually evaluate a very similar kind of algoritm for a S12 C32, with CRC and block replication. Even though I actually managed to write one that could be regarded as somewhat safe, the conclusion was that the algoritm was way too slow to be used in the real world. And then the S12 has 512 bytes large segments and not 16k!!!

 

Also, at the whole idea of having duplicates of the same data all over the flash segement, my guts scream out "don't do it!". MISRA-C also has a rule against using the same memory cell for unrelated purposes.

 

I'm sorry to say it, but the method proposed in that app note can only be used in hobbyist projects. No serious developer would even consider using it.

 

0 Kudos
Reply

862 Views
almarto
Contributor IV

Hello everybody,

 

Where could I get this application note called "EEPROM emulation with MPC5500 family microcontrollers". I have looked for it in this webpage and didn't find anything and I would like to evaluate this software.

 

Besides, I am using MPC5643L microcontroller and would like to know if there is any example code available. I bought the evaluation board but, unfortunately, there is no example code within the package. Could anybody help me?

 

Thank you very much for your collaboration.

 

Regards from Spain!

0 Kudos
Reply

862 Views
Redevil
Contributor I

Hi Lundin,

 

Your point is a valid one , I have worked on MPC5604p and it has the same thing no on chip EEPROM and beats the hell out of me why why ?.

Anyways dude need help on something I have started working on the MPC5643L and was trying some sample code and

was trying to configure the clock. But some how its not working. I am attaching the code with this post. The problem is

while i am trying to change the mode of the MCU its always stuck in SAFE mode :smileysad: . Can you take a look at the code

and tell me where I am doing wrong ?

 

Cheers

Redevil

0 Kudos
Reply

862 Views
Lundin
Senior Contributor IV

I have never used MPC5643, and I likely never will, as it lacks on-chip eeprom.

0 Kudos
Reply