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

Clock not starting

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



Joined: 31 Dec 2010
Posts: 39

View user's profile Send private message

Clock not starting
PostPosted: Fri May 31, 2024 12:17 pm     Reply with quote

Hello,

About 3-5% of my parts are not starting the external oscillators properly. When I program them through CCSLOAD they do start. It's just when I re-apply power that they don't start ( no oscillator frequency ).

I'm using a dsPIC33CK32MP502 with a 16Mhz external crystal

My fuses are

#FUSES WDT, WINDIS, WPOSTS=512, PROTECT, HS, CKSFSM, PLLWAIT, XTGAIN2, XTBST, NODEBUG
#use delay(crystal=16M,clock=160M)

I have a 1M resistor across the oscillator pins.

Any ideas on what to look for?
What does the CCSLOAD programmer do to kick-start the oscillator into working?

Thanks,
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri May 31, 2024 12:38 pm     Reply with quote

While I don't use that PIC....

1) the resistor value depends upon the make/mfr of the crystal, 'loading' caps, board layout, etc. What does the datasheet say about the value ?

2) There's usually a fuse called 'PUT' ( Power Up Timer ) which I have always enabled for decades. It will help with 'startup'.

3) Hopefully, those that use that PIC series will probably reply fairly soon....
pebbert9



Joined: 31 Dec 2010
Posts: 39

View user's profile Send private message

PostPosted: Fri May 31, 2024 2:13 pm     Reply with quote

Unfortunately this particular chip doesn't have a PUT fuse.

It is taking my dc supply about 500-600 micro-seconds to get to 3.3V, does this seem like a reasonable amount of time?
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri May 31, 2024 3:20 pm     Reply with quote

curious, I downloaded the datasheet, looked in the 'clock' section. Sadly NO design help for selection of caps and resistor based on crystal speed ! uChip used to provide this info ,along with specific PCB layout information.
No 'PUT', hmm...maybe it's called something else or embedded in the PLL ?
Hopefully a dsPIC guru will reply soon !
pebbert9



Joined: 31 Dec 2010
Posts: 39

View user's profile Send private message

PostPosted: Fri May 31, 2024 3:37 pm     Reply with quote

I finally traced my problem to bad solder joints from our assembler.

There is minimal amounts of solder on some of the pins causing intermittent issues.

Thanks for your help.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jun 01, 2024 5:31 am     Reply with quote

oops.... yes... ONE bad solder joint can cause ALL sorts of 'hair loss' !!
Glad you found it !!
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Sun Jun 02, 2024 7:00 am     Reply with quote

Just a couple of comments on this.

First, glad you have found the problem. Smile
Then on the PUT, this is permanent on this chip when using the primary
oscillator. It has a 1024 clock delay when starting this oscillator. Look
at DS700005255 for details. It starts this when the oscillator starts, and
then counts 1024 cycles for it to become stable before starting using it.
The startup takes the oscillator start time, plus this 1024 cycle count, plus
the PLL sync time (Tlock).

Best Wishes
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