RE: AN2789 - MPC5500 Configuration and Initialization
"Dobbin Allan-r11834" <[email protected]> Thu, 11 Jan 2007 15:17:42 -0700
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <4147ED8B92A864498825C07E53594E4A01D5474F@az33exm20.fsl.freescale.net> |
Tony, I don't have that code but can confirm its only talking about
writing to the FLASH_BIUCR register, so the minimum you have to do is to
execute a write instruction from RAM. You can accomplish that in C by
writing the required opcodes to RAM followed by 0x4e800020 (branch to
LR) and then calling "JumpToAddress (RAMaddr);" function as below:
asm void JumpToAddress (int register address)
{
mtlr address
blrl
}
This compiles with Codewarrior.
I can't tell you the exact reason why this is neccesary, but glitching
seems a reasonable assumption. Its similar to the fact that you can't
change the chip select register settings when you are using that
particular chip select to execute from external memory.
What I can tell you is that I have encountered problems changing the BIU
register while executing from flash, so you should definately follow
that guideline.
- Allan
________________________________
From: [email protected] [mailto:[email protected]] On Behalf
Of Tarascio, Tony
Sent: Thursday, January 11, 2007 3:52 PM
To: [email protected]
Subject: [MPC500] AN2789 - MPC5500 Configuration and Initialization
Does anyone know where the application note:
Freescale Semiconductor Application Note
AN2789, "MPC5500 Configuration and Initialization", Rev. 1.1,
10/2004
by Glenn Jackson, TECD Applications
and the accompanying code can be found? I have the app note, but not the
code, and I cannot locate either anywhere on the Freescale web site.
I am particularly interested in the section that initializes the
internal flash memory wait states. The app note states that the code
setting the flash wait state registers cannot run from flash. Does
anyone know why?
Although I suspect that it has something to do with the flash access
"glitching" when the access parameters are changed, this is not
explicity stated in the app note, nor in the MPC5554 manual.
Thanks in advance,
Anthony A. Tarascio
Sr. Software Developer
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]