CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

USB Bootloader and Reset Problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Tre



Joined: 03 Jun 2005
Posts: 21

View user's profile Send private message

USB Bootloader and Reset Problem
PostPosted: Tue Dec 18, 2007 10:47 pm     Reply with quote

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
Tre



Joined: 03 Jun 2005
Posts: 21

View user's profile Send private message

PostPosted: Tue Dec 18, 2007 11:05 pm     Reply with quote

So it appears that when it gets into this "state" the oscillator isn't oscillating. I don't do any kind of oscillator switching, just an external resnator at 10MHz.

Any ideas?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group