Our project requires us to program some external MRAM while programming the internal flash from the flash programming tool. Obviously the programmer can do this as MRAM debug works, and programming flash works, but can they be combined so the flash programing tool will do it?
I can see various ways to do this (most take time and require some dvelopment). I am reasonably sure Codewarriors Flash Programming Tool can be configured to do this but cannot find any documentation or help on the topic as the programmer uses vectors in more of a continuous fashion, and I am not sure how it will know to treat the MRAM as MRAM instead of Flash...
Can someone tell me how I could modifiy MCF52259_INTFLASH.xml to program some MRAM? Or can someone send me their XML for their settings? Or tell me how they have tackled this problem?
I am using codewarrior 7.1.2 (all up to date), I the selct "Tools -> Flash Programmer".The tool I am using to program the device is the Cyclone MAX. I am also using MQX RToS.
I basically just need to add a section to program from 0x10000000 to 0x10080000 in MRAM along with my Flash data. As soon as my s19 contains data in this MRAM section the flash programmer gives me the obviou error:
0x000XXXXX bytes of Target Memory at 0x10060000 is not within flash boundaries.
Thanks in advance, Carl.
If you have enough Flash memory, you can try the following:
Combine your flash code and MRAM code into one file and program it into your flash. When CPU startup, it will copy the 'MRAM code' from flash to MRAM address.
Or you could program your flash code, then program the MRAM code into flash separated to another unused address in flash. When CPU startup, it will copy the 'MRAM code' from flash to MRAM address.
If only few people using this flash, I don't think PE will support it.
I have come up with a temp fix.
I am using PE Micro's interactive programmer to program just the flash section (as this allows you to overide the out of range error unlike codewarrior), but, then, I go back to codewarrior to program MRAM using the MRAM debug build wht the same code to program the MRAM... Wow, talk about overly complicated! Surely there is a better way?
Is there a programming algorthim that i can use to program the MRAM section from their interfactive programmer maybe?
I wonder if PE Micro's standalone programmer will allow this to all happen?
I haven't worked with MRAM devices before. Is it read and written just like regular SRAM?
P&E can generate a custom algorithm for programming the MRAM. In the end you'll have two algorithms (one for the MCF52259 internal flash and one for the external MRAM). Just submit a support request on the P&E website with your external MRAM connections (such as chip select, output enable, write enable, etc.)
Since you'll end up with two algorithms, you'll probably want a way to automate the process. You can either use the Cyclone MAX's stand-alone capability or use the command-line version of PROGCFZ. In the first case, you'll simply press the START button on the Cyclone MAX to program both your internal flash and external MRAM. If using the command-line version of PROGCFZ, you'll run a batch file which will program both.
Yes, MRAM is exactly like SRAM but also nonvolatile.
I would guess they probably already have an algorithm because the 52259evb comes with MRAM and has MRAM debug which programs and runs from Codewarrior via the Cyclone MAX + Onboard PE Micro debugger.
I will submit a support request and just supply the schematics for the 52259evb and they might be able to release, or, tell me where the algorithms are located.