我在过去的1个月里对PIC32 MK进行了评估(其中有一个健康的假期),外设看起来很有希望,但是我似乎无法让它以最大速度运行。我首先注意到它比以前的DSPIC33 EP慢。我用一个输出和一个作用域来测试100个指令(DMA配置,没有分支,但SFR使用),它看起来大约40M指令/s,看起来PCACH不工作了。??????!我试着用一个和谐来运行一个例子,但是如果我试图遵循教程并调用板配置器,我在MPLAB X中只会有例外。(仍然2.0.3BTW,下载2.0.4,但必须仍然尝试),所以使用数据表和PIC32 MX外设LIBS,我试图创建自己的SysSt配置性能,我猜SysCLK=120 MHz是好的(因为PB2 1:1,SPI的除数似乎是合乎逻辑的)。大多数似乎都是OK的,除了它是缓慢的。我尝试撤销寄存器,它们似乎是OkCONFIG位:α-PrimLoMult=Mule60,FPLLLKK=PLLYPOSC,FPLLIDEV=DIVIO1,FPLLoDIV= DIVIO4,FWDTEN= OFF,FPLLRNG=RangeEy5510MHz MHz,PrimaMac配置PASCMOD=HS,FNOSCC=SPLL,DMCTCNT=DMT31,FDMT,FDMT。EN=OFF,DDSDTEN=OFF,PMDL1WORE=OFF,IOL1WORE=OFF,ICESEL=ICSU-PGX3,JTAGEN=OFFOW 8MHz晶体/FPLLIDEV=1×FPLLMULT=60 /FPPLIDEV=4=8×60/4=120个实际寄存器:PRISS:0x100000 7使用阴影集1用于我最常用的中断检测:0x07000,13PeCHEN=1 DCHEN=1 IcHEEN=1 PREFEN=1 PFMWS=3(如指定为120时钟)PB1DIV:0x000 90088 PB2DIV:90008900PB3DIV:90008900PB4DIV:90008900PB5DIV:90008900PB6DIV:00008803个30 MHz MAX,但仅用于DSCON(深度睡眠),RTCC(实时时钟)无关?PB7DIV:读取OnLyfC016,0:A4210583XX3= kSeG0,指令预取缓存(推荐)OSCCon:00201102 sOSCEN=1SO,我可能丢失了一些东西,但是什么?任何线索、洞察力、事物都要检查吗?
以上来自于百度翻译
以下为原文
I've evalua
ting the pic32mk for the last 1 1/2 month (with a healthy holiday somewhere in it), and the peripherals looks promising.
However I can't seem to get it to run at max speed. I first noticed it was slower than the previous dspic33ep. I benchmarked about hundred instructions (DMA configuration, no branches, but SFR usage) using an output and a scope, and it seems to do about 40M instructions/s, iow it seems the
pcache is not working?!?!?!
I tried to run an example with h
ARMony, but I only got exceptions in MPLab X if I tried to follow the tutorials and invoke the board configurator. (still 2.0.3b btw, have download 2.0.4 but must still try)
So using datasheets and the pic32MX peripheral libs I tried to create my own sysconfigperformance, and my guess is that the SYSCLK=120MHz is good (since with PB2 1:1 the divisors for SPI seem logical). Most seems to work ok, except that it is slow.
I tried to dump the registers , and they seem to be ok
config bits:
#pragma config FPLLMULT = MUL_60, FPLLICLK =PLL_POSC ,FPLLIDIV = DIV_1, FPLLODIV = DIV_4, FWDTEN = OFF, FPLLRNG=RANGE_5_10_MHZ
#pragma config POSCMOD = HS, FNOSC = SPLL, DMTCNT=DMT31, FDMTEN= OFF, DSWDTEN =OFF, FDSEN=OFF, PMDL1WAY = OFF,IOL1WAY=OFF,ICESEL = ICS_PGx3, JTAGEN = OFF
iow 8MHz crystal /FPLLIDIV=1 * FPLLMULT=60 / FPPLODIV=4 = 8*60/4=120
actual registers:
PRISS : 0x10000000 7 uses shadowset 1 for my most used interrupt
CHECON: 0x07000013 percheen=1 dcheen=1 icheen=1 prefen=1 PFMWS=3 (as specified for 120 clock)
PB1DIV: 0x00008800
PB2DIV: 00008800
PB3DIV: 00008800
PB4DIV: 00008800
PB5DIV: 00008800
PB6DIV: 00008803 30 MHz max but only used for DSCON (deep sleep),RTCC (realtime clock) unrelated ?
PB7DIV: read only
mfc0 16,0: A4210583 xxx3 = kseg0, Instruction Pre-fetch cached (Recommended)
OSCCON: 00201102 SOSCEN=1
So I'm probably missing something, but what ? Any clues, insights, things to check?
0