Dwayne Dietrich

CAN Bootloader

Discussion created by Dwayne Dietrich Employee on Jan 29, 2006


This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.



 





Date: Tue Feb 15, 2005 11:29am


 


Subject: CAN Bootloader


 


    I am currently implementing a CAN Bootloader, I am using the Bootloader saved in the file store of this group and the Bootloader documented in AN1828/D as reference.

I have a question regarding running the Bootloader from RAM, we currently use the serial Bootloader from the freescale site, this copies itself into RAM and moves RAM to the upper 4k of flash to overlay the Bootloader allowing all other flash locations to be programmed. I cannot see in either of the CAN Bootloaders RAM being moved to the upper 4k of flash.


Does anyone know if I am missing something here, should the RAM be moved as with the serial version as I believe it should be?


Thanks in advance


 









Date: Tue Feb 15, 2005 4:00pm


 


    Which mcu are we talking about? I don't know of any where the RAM would be overlaping the Flash. In fact, I thought moving RAM to upper 4K would in fact cover part of Flash. Or what upper 4K are we talking about?


 









Date: Wed Feb 16, 2005 2:13am


The main reason to copy and execute from RAM is to allow to erase/reprogram the flash page where bootloader is stored, excepting the bootloader itself.


 









Date: Wed Feb 16, 2005 2:53am




Yes I understand this, the problem I have is that the serial Bootloader I use at the minute writes to the INITRM register to move the RAM to the top 16k address location, so the rest of the flash can be programmed except the Bootloader. The two CAN Bootloaders I am using as reference get copied into RAM via a LRAE but do not appear to write to this register thus leaving the RAM in its default location, I am trying to ascertain if there is a reason for the RAM being left in its default location.


 









 


Date: Wed Feb 16, 2005 4:53am




The main reason to move the RAM to the top of the memory, is if you want to process interrupts while executing the Flash programming algorithms from the internal RAM (since the high Flash page is available to supply the interrupt vector when this Flash block is being updated).


If you are sure there will be no interrupt requests, moving the RAM is not necessary - you can execute from the RAM in its default Reset location.


Hope this helps,

Message Edited by Dietrich on 01-29-2006 11:36 AM

Message Edited by Alban on 01-30-2006 10:33 AM

Outcomes