Tre
Joined: 03 Jun 2005 Posts: 21
|
USB Bootloader and Reset Problem |
Posted: Tue Dec 18, 2007 10:47 pm |
|
|
I recently converted a PIC18F4455 project to use a bootloader. After playing with the Microchip USB Bootloader and tweaking my code I finally got it working.
However, I noticed a new problem this afternoon. It seems that when I press the reset button on my board with the bootloader, it fails to even startup properly. I'm not sure where it is failing in the code, but one of the first things that I do is enable a LED on the board. It never gets to that point. However, if I cycle the power (or unplug the device since it is USB powered) then it works fine.
Is there something with the reset vector that I need to be aware of?
//////////////////////////
// BOOTLOADER CONFIG //
//////////////////////////
#define _bootloader
#ifdef _bootloader
#define LOADER_END 0x7FF
#define LOADER_SIZE 0x6FF
#build(reset=LOADER_END+1, interrupt=LOADER_END+9)
#org 0, LOADER_END void bootloader(void) {}
#endif
The bootloader is the Microchip USB bootloader.
Thanks,
Drew |
|