Microchip
直播中

张俊

7年用户 180经验值
私信 关注
[问答]

PIC32MZ2048EFH100只能使用内部振荡器进行调试

嗨,所有的,我试图提出一个自定义板,这是基于PIC32 MZ2048 EFH144以太网启动套件,即相同的24MHz晶体,但不同的设备。系统运行在200兆赫。如果我试图调试使用ICD 3,我得到以下信息:我可以让它使用内部OSC工作这里是我的设置与外部时钟-恰巧是相同的使用以太网起动器套件。有任何想法为什么这不起作用?谢谢。

以上来自于百度翻译


      以下为原文

    Hi All,
I'm attempting to bring up a custom board which is based upon the PIC32MZ2048EFH144 Ethernet starter kit i.e. same 24MHz crystal but different device.

The system is running at 200MHz.

If I attempt to debug using the ICD 3 I get the following message:Programming...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x1bfff
boot config memory
configuration memory
Programming/Verify complete
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.

I can make it work by using the internal oscillator.
Here are my settings with the external clock - which happen to be exactly the same as using the Ethernet starter kit.
/*** DEVCFG0 ***/
#pragma config DEBUG = OFF
#pragma config JTAGEN = OFF
#pragma config ICESEL = ICS_PGx2
#pragma config TRCEN = OFF
#pragma config BOOTISA = MIPS32
#pragma config FECCCON = OFF_UNLOCKED
#pragma config FSLEEP = OFF
#pragma config DBGPER = PG_ALL
#pragma config SMCLR = MCLR_NORM
#pragma config SOSCGAIN = GAIN_2X
#pragma config SOSCBOOST = ON
#pragma config POSCGAIN = GAIN_2X
#pragma config POSCBOOST = ON
#pragma config EJTAGBEN = NORMAL
#pragma config CP = OFF
/*** DEVCFG1 ***/
#pragma config FNOSC = SPLL
#pragma config DMTINTV = WIN_127_128
#pragma config FSOSCEN = OFF
#pragma config IESO = OFF
#pragma config POSCMOD = EC
#pragma config OSCIOFNC = OFF
#pragma config FCKSM = CSECME
#pragma config WDTPS = PS1048576
#pragma config WDTSPGM = STOP
#pragma config FWDTEN = OFF
#pragma config WINDIS = NORMAL
#pragma config FWDTWINSZ = WINSZ_25
#pragma config DMTCNT = DMT31
#pragma config FDMTEN = OFF
/*** DEVCFG2 ***/
#pragma config FPLLIDIV = DIV_3
#pragma config FPLLRNG = RANGE_5_10_MHZ
#pragma config FPLLICLK = PLL_POSC
#pragma config FPLLMULT = MUL_50
#pragma config FPLLODIV = DIV_2
#pragma config UPLLFSEL = FREQ_24MHZ
/*** DEVCFG3 ***/
#pragma config USERID = 0xffff
#pragma config FMIIEN = OFF
#pragma config FETHIO = ON
#pragma config PGL1WAY = ON
#pragma config PMDL1WAY = ON
#pragma config IOL1WAY = ON
#pragma config FUSBIDIO = ON
/*** BF1SEQ0 ***/
#pragma config TSEQ = 0x0000
#pragma config CSEQ = 0xffff

Any ideas why this does not work?

Thanks.

回帖(6)

陆欣楠

2019-3-25 06:26:28
你的板上有水晶吗?还是振荡器芯片?晶体需要由PIC驱动,因为振荡器具有所有的自包含,并且仅输出一个方波。起动器工具包使用振荡器芯片。因此,“EC”(外部时钟)POSCMOD。如果你实际使用的是水晶,那么你需要将你的模式改变为高速水晶的“HS”。在EC模式下,你的水晶没有振荡的方式(通常)!最后,请注意PIC32 MZ系列振荡器的勘误表(勘误表2)修订版A1硅:晶体振荡器不能用作主振荡器(OSC1/OSC2管脚)的输入。修订版A3硅:主振荡器已在正常的上电序列中测试过。支持特定的晶体操作。

以上来自于百度翻译


      以下为原文

     
Do you have a Crystal on your board?  Or an Oscillator chip?  A crystal needs to be driven by the PIC, where as an oscillator has all of that self contained and just outputs a square wave on its own.
 
The starter kit is using an Oscillator chip.  Hence, the "EC" (external clock) POSCMOD.
 
If you are actually using a Crystal, then you need to change your mode to "HS" for High Speed Crystal.  In EC mode, your crystal has no way to oscillate (normally! see errata below).
 
Finally, note the errata for the PIC32MZ family for the oscillator:
 
(Errata 2)
Revision A1 Silicon: A crystal oscillator cannot be used
as an input to the Primary Oscillator (OSC1/OSC2 pins).
Revision A3 Silicon: The Primary Oscillator has been
tested in a normal power-up sequence and supports
specific crystal operation.
举报

陈晨

2019-3-25 06:40:32
“我试图提出一个定制板,它是基于PIC32 MZ2048 EFH144以太网启动器套件,即相同的24MHz晶体,但不同的设备。”正如所指出的,以太网启动器套件没有晶体。它有一个时钟振荡器IC。

以上来自于百度翻译


      以下为原文

    "I'm attempting to bring up a custom board which is based upon the PIC32MZ2048EFH144 Ethernet starter kit i.e. same 24MHz crystal but different device. "
As Pointed out the Ethernet starter kit does not have a crystal.  It has a clock oscillator IC.
举报

杨叶

2019-3-25 06:59:37
嗨,1 /如果你使用XTAL,改变配置位符合。2/确保你为你的PIC32 MZ2048 EFH100选择了正确的调试接口,你把ICSP连接到PGC2/PGD2了吗?如果不是,你需要根据你的观点来改变

以上来自于百度翻译


      以下为原文

    Hi,
1/ If you use an XTAL, change the configuration bits accordingly.
2/ Make sure that you selected the right debug interface # for your board PIC32MZ2048EFH100.
Did you connect the ICSP to the PGC2 / PGD2 ? if not you need to change the #pragma config ICESEL = ICS_PGx2 accordingly
Regards
 
举报

陈晨

2019-3-25 07:14:34
如果您正在使用XTAL:请阅读Erratta:http://WW1.Microchip .com……EVICEDOC/8000 66 3D.PDF

以上来自于百度翻译


      以下为原文

    If you are using an Xtal: Read the Erratta:
http://ww1.microchip.com/...eviceDoc/80000663D.pdf
举报

更多回帖

发帖
×
20
完善资料,
赚取积分