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 CCS Technical Support

write_eeprom locking up 18F2620

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



Joined: 21 Nov 2006
Posts: 129

View user's profile Send private message

write_eeprom locking up 18F2620
PostPosted: Fri Jun 22, 2007 11:24 am     Reply with quote

Hi,

I just upgraded from an 18F2520 to 18F2620. All I had to do with the code was change the header file for the chip (and a Brownout fuse value that was different). The code compiles, and everything seems to run fine except all my write_eeprom functions. As soon as it is called, the chip locks up and stays that way until the WDT does its thing.

I've looked through the datasheet, and the only thing I can see different between the chips with regard to the EEPROM is that the 2620 has 1024 bytes instead of 256. I thought maybe the write_eeprom function had to get a 16 bit value, and tried that, but as I expected, that didn't do anything.

Any ideas on what I could be missing?
evsource



Joined: 21 Nov 2006
Posts: 129

View user's profile Send private message

PostPosted: Fri Jun 22, 2007 11:52 am     Reply with quote

Well, I jumped the gun posting. It turns out it *was* a fuse setting.

I'm using a bootloader, and the fuses set in the CCS code are not actually written to the chip. The fuse values come from the bootloader program. I haven't been able to nail down exactly what fuse setting it was that was causing the mentioned problem (along with some other bugs I was finding). I just went in and edited the fuse values in the ICSP program to match the fuse values that my CCS code was producing (to make a long story short, I programmed just the raw CCS program using the ICSP onto my chip, and everything ran fine. I opened the CCS program's hex file in the ISCP programmer to see what fuse values it had set, which included several values not specified in the code, i.e. all the fuse values. I then duplicated all those fuse values into my bootloader hex file, and voila!).

So hopefully if anyone sees any weird behavior similar to mine while using a bootloader, they might try what I did and get the problem fixed.
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