Hi everyone, I finally made the jump to a PIC32MX795F512H (64pin .5mm pitch LQFP) uC. I purchased this board from proto-advantage.com so I can prototype with a touch screen that I also purchased. I am also using MPLAB X 1.6 and C32.
The main problem I am experiencing is with the oscillator. Now before I go into detail, I rechecked the connections and I am confident I have them correct. However, upon programming the uC I get an error message stating that my configuration bits are incorrect.
Here is a picture of the error and circuit:
**broken link removed**
**broken link removed**
I've done some research and narrowed down which configuration bit is causing the issue:
"Programming/Verify complete
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding.".
This line of code is causing the issue.
This most likely means this is a problem with my resonator. I hope it isn't placed too far from the pins. The data sheet recommends 12mm distance. I tried putting it closer and soldering short wires to another resonator, but it still didn't work.
_______________________________________
So my questions are as follows:
1. Is it the resonator causing the issue?
2. If I have to use the internal oscillator for the PIC32, is it really that much worse compared to and external part?
3. What other actions should I take? What suggestions can you make? What issues do you see? etc..
Thanks for anyone taking the time to reply and assist me with this matter.
Note: The PIC32 does blink the LED I have and operates properly when using the internal oscillator and not the PRIPLL config (albeit slower than expected since I don't have the proper configuration for the internal oscillator setup).
The main problem I am experiencing is with the oscillator. Now before I go into detail, I rechecked the connections and I am confident I have them correct. However, upon programming the uC I get an error message stating that my configuration bits are incorrect.
Here is a picture of the error and circuit:
**broken link removed**
**broken link removed**
Code:
// DEVCFG3
// USERID = No Setting
#pragma config FSRSSEL = PRIORITY_7 // SRS Select (SRS Priority 7)
#pragma config FMIIEN = OFF // Ethernet RMII/MII Enable (RMII Enabled)
#pragma config FETHIO = OFF // Ethernet I/O Pin Select (Alternate Ethernet I/O)
#pragma config FCANIO = OFF // CAN I/O Pin Select (Alternate CAN I/O)
#pragma config FUSBIDIO = ON // USB USID Selection (Controlled by the USB Module)
#pragma config FVBUSONIO = ON // USB VBUS ON Selection (Controlled by USB Module)
// DEVCFG2
#pragma config FPLLIDIV = DIV_2 // PLL Input Divider (4x Divider) Using 20MHz/4 = 5MHz
#pragma config FPLLMUL = MUL_16 // PLL Multiplier (16x Multiplier) 5MHz * 16 = 80Mhz
#pragma config UPLLIDIV = DIV_5 // USB PLL Input Divider (5x Divider)
#pragma config UPLLEN = OFF // USB PLL Enable (Disabled and Bypassed)
#pragma config FPLLODIV = DIV_2 // System PLL Output Clock Divider (PLL Divide by 1) => 80Mhz/1 => 80MHz
// DEVCFG1
#pragma config FNOSC = PRIPLL // Oscillator Selection Bits (Primary Osc w/PLL (XT+,HS+,EC+PLL))
#pragma config FSOSCEN = OFF // Secondary Oscillator Enable (Disabled)
#pragma config IESO = OFF // Internal/External Switch Over (Disabled)
#pragma config POSCMOD = HS // Primary Oscillator Configuration (HS osc mode)
#pragma config OSCIOFNC = OFF // CLKO Output Signal Active on the OSCO Pin (Disabled)
#pragma config FPBDIV = DIV_1 // Peripheral Clock Divisor (Pb_Clk is Sys_Clk/1)
#pragma config FCKSM = CSDCMD // Clock Switching and Monitor Selection (Clock Switch Disable, FSCM Disabled)
#pragma config WDTPS = PS1 // Watchdog Timer Postscaler (1:1)
#pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT Enabled)
// DEVCFG0
#pragma config DEBUG = OFF // Background Debugger Enable (Debugger is disabled)
#pragma config ICESEL = ICS_PGx1 // ICE/ICD Comm Channel Select (ICE EMUC1/EMUD1 pins shared with PGC1/PGD1)
#pragma config PWP = OFF // Program Flash Write Protect (Disable)
#pragma config BWP = OFF // Boot Flash Write Protect bit (Protection Disabled)
#pragma config CP = OFF // Code Protect (Protection Disabled)
I've done some research and narrowed down which configuration bit is causing the issue:
"Programming/Verify complete
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding.".
This line of code is causing the issue.
Code:
#pragma config FNOSC = PRIPLL // Oscillator Selection Bits (Primary Osc w/PLL (XT+,HS+,EC+PLL))
This most likely means this is a problem with my resonator. I hope it isn't placed too far from the pins. The data sheet recommends 12mm distance. I tried putting it closer and soldering short wires to another resonator, but it still didn't work.
_______________________________________
So my questions are as follows:
1. Is it the resonator causing the issue?
2. If I have to use the internal oscillator for the PIC32, is it really that much worse compared to and external part?
3. What other actions should I take? What suggestions can you make? What issues do you see? etc..
Thanks for anyone taking the time to reply and assist me with this matter.
Note: The PIC32 does blink the LED I have and operates properly when using the internal oscillator and not the PRIPLL config (albeit slower than expected since I don't have the proper configuration for the internal oscillator setup).
Last edited: