PDA

View Full Version : Disabling bootloader under program control



Charles Linquis
- 9th March 2007, 21:02
I use Mechanique's MCLOADER as a bootloader for my code. Recently, a customer has asked if I could disable the bootloader under program control.

I'm thinking the easiest thing to do is modify the configuration registers using Darrel Taylor's code, but I can't find one register that will disable ALL writes to flash. Sort of a "global write protect". Am I missing something?

b1arrk5
- 14th March 2007, 14:32
Hi Charles,

I read somewhere that if you set the code protect fuse that will disable the bootloader. I'm not sure if this will help you or not. My only other thought was that Steve (Mister-E) had posted a schematic to add a transistor that would allow the software to pull the reset pin, thereby allowing automatic boot loading, no need to press a button. You might be able to utilize something like that, and control the transistor from your software to not allow boot loading.

Good Luck,

Jerry.

Charles Linquis
- 14th March 2007, 15:35
I appreciate the response, but these suggestions won't solve my problem. First, Mechanique's bootloader doesn't require that you pull MCLR low. A power cycle is good enough to get it started. So the additional transistor you mention isn't needed for that.
Also, my hardware is already built, so there can be no changes there.

I use the RS-232 port both for communication and for bootloading, so I can't "kill" the serial port to stop the bootloader. About the only thing I can do is to stop all FLASH WRITEs.

I also can't set the code protect fuse, since I need to be able to turn the booloader ON again!