View previous topic :: View next topic |
Author |
Message |
pebbert9
Joined: 31 Dec 2010 Posts: 39
|
Clock not starting |
Posted: Fri May 31, 2024 12:17 pm |
|
|
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: 9243 Location: Greensville,Ontario
|
|
Posted: Fri May 31, 2024 12:38 pm |
|
|
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
|
|
Posted: Fri May 31, 2024 2:13 pm |
|
|
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: 9243 Location: Greensville,Ontario
|
|
Posted: Fri May 31, 2024 3:20 pm |
|
|
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
|
|
Posted: Fri May 31, 2024 3:37 pm |
|
|
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: 9243 Location: Greensville,Ontario
|
|
Posted: Sat Jun 01, 2024 5:31 am |
|
|
oops.... yes... ONE bad solder joint can cause ALL sorts of 'hair loss' !!
Glad you found it !! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Sun Jun 02, 2024 7:00 am |
|
|
Just a couple of comments on this.
First, glad you have found the problem.
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 |
|
|
|