Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/02/10 15:23
Read: times


 
#177063 - And for reliability...
Responding to: ???'s previous message
For reliability any embedded boot loader, ie the region you try to keep protected, MUST capture and contain the reset restart point. Since on the 8051/8051 architecture the reset point is included in with the interrupt vectors it is essential that the boot loader wrap itself around the interrupt vector table.

If you implement the boot loader off to another portion of the code space and then start a reprogramming process which erases and starts to modify the base memory page where the restart point and interrupt vectors are located and then get an upset event the system is toast!! At that point the system has to be returned back to the factory or service center to be opened up and have the MCU chip be reprogrammed by other means.

So in summary to the question of whether the boot loader on an 8051 architecture MCU has to use interrupts or not - No it does not have to but it might as well do so since it has to capture the interrupt vector table anyway and provide a forwarding function to the application. This is shown in the boot loader code that I linked to in the earlier post. Note that the code posted does not have an application validity checking scheme built into it. For that version, if there is an upset during reprogramming the application, the user has to simply restart the product and reinvoke the boot loader by whatever means is applicable to that implementation.

Another thing to consider for ultimate reliability is to have the boot loader also include a CRC check of the application image area of the program memory. If the image CRC fails to check out properly then the boot loader should not try to launch the application as it normally would at system start. Instead the loader would stay in boot loader mode waiting for the host side downloader program to talk to it and download a good application image.

There are many means that can be used to invoke boot loader operation....jumper.....switch button combination held down....serial port handshake in first short time after startup.....I-Button dongle being active....etc etc. The posted code uses a method of looking for a specific sequence of bytes arriving from the serial port starting within the first fraction of a second after startup.

I can comment that for the ultimate in reliability and covering all the cases for error checking, handshaking and adaptability to the specific product and user environment it is best to write and provide your own downloader program that talks to the assembly language boot loader.

Michael Karas


List of 13 messages in thread
TopicAuthorDate
IAP / Dual applications and interrupts            01/01/70 00:00      
   Bootloaders Share Interrupts Like This            01/01/70 00:00      
      not necessarily a good idea            01/01/70 00:00      
         Hogworts.....            01/01/70 00:00      
            interesting concept            01/01/70 00:00      
         an added note            01/01/70 00:00      
   Does the bootloader _have_ to use interrupts?            01/01/70 00:00      
      Forwarding of interrupts.            01/01/70 00:00      
         And for reliability...            01/01/70 00:00      
            Special Hardware Features Also Show up            01/01/70 00:00      
            emphasizing another factor            01/01/70 00:00      
               Let me comment on that...            01/01/70 00:00      
   Yet another consideration with boot loader.            01/01/70 00:00      

Back to Subject List