完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有一个奇怪的问题与APIC24FJ128GA204配置,以保持RTCC关闭VBAT时,主电源断开,它的工作约70%,如果时间。当它工作正常的时候,我有一个DVM测量,刚刚从备份电池(大约2.6V)引出,当它不工作时,PIC绘制135NA或70NA和RTCC时钟暂停。我已经看了固件和硬件设置。我选择的晶体有一个80kHm的ESR,比我意识到的最大10K,这是问题吗?我还没有把一个范围放在水晶上看发生了什么。这里有一个配置比特的拷贝://CONT4*PracMa配置文件DSWDTPS= DSWDTPS1F//深度睡眠看门狗定时器后标选择位(1:68 7194767 36(25.7天))。(DSWDT使用LPRC作为参考时钟)* PrimaMac配置,DSBRONE= OF//深度睡眠BOR允许位(DSBOR使能)α-PrAPMA配置DSWDTEN = OF//深度睡眠看门狗定时器启用(DSWDT启用)α-PracMA配置DSWEN=ON//DSEN位使能(深睡眠由寄存器位DSEN控制)G PLLDIV=禁用/ /USB 96兆赫PLL预分频器选择位(PLL禁用),γ-PracMA配置I2C1SEL =禁用/ /替代I2C1使能位(I2C1使用SCL1和SDA1管脚)IG WPFP=WPFP127/ /写保护闪存页边界边界(第127页(0x1FC00))α-PracMA配置文件sOSSESE= ON//SOSC选择位(数字(SCLKI)模式)α-PrimaMac配置WSDBIN=PS2500//窗口模式看门狗定时器窗口宽度选择(看门狗定时器窗口宽度为25%)PLLSS=PLLYPRI/PLL二次选择配置位(PLL是由主振荡器馈送的)配置页选择(禁用),γ-PrAPMA配置,WpEnt= WPTMEM//段写保护结束页选择(写保护从WPFP到内存的最后一页)//CONT2×Prima配置文件POSCMD=HS/主振荡器选择(HS振荡器启用)α-PrAPMA CONFIG WDTTCK=LPRC/ / WDT Clock SouRCE选择位(WDT使用LPRC){PrimaMaCorg OSCIOFCN= OF/OSCO PIN配置(OSCO/CKO/RA3函数作为CLKO(FoCC/2))γ-PracMA配置FCKSM=CSDCMD//时钟切换和故障安全时钟监视器配置位(时钟切换和故障安全时钟监视器被禁用)NOSCC=PRI/ /初始振荡器选择(主振荡器(XT,HS,EC))α-PracMA配置,ALTCMPI=CXCXYRB//替代比较器输入位(C1CN在RB13上,C2Cin在RB9上,C3CN在RA0上)。DTCLK配置位)(S.Prack-ICOS= OF//内部外部切换(禁用)//OpFix1 Prima配置文件WDTPS=PS327 68 / /看门狗定时器后定标器选择(1:327 68)×PrimaMac配置FFPSA=PR128//WDT预分频比选择(1:128)标准看门狗定时器(μ-Pracm配置)FWDTEN=OF//看门狗定时器使能(WDT硬件禁用;SWDTEN位禁用)μPrimaMac配置模块=PGX1//仿真器引脚放置选择位(仿真器功能与PGEC1/PGED1共享)禁用-不包括ReT10)PrApRiga配置文件GWRP= OF//通用段写保护(允许写入程序存储器)
以上来自于百度翻译 以下为原文 I have an odd problem with a PIC24FJ128GA204 configured to keep running the RTCC off vBAT when the main power is disconnected. It works about 70% if the time. When it works correctly I have a DVM measuring just under 400nA being drawn from the backup battery (about 2.6V), when it doesn't work the PIC draws either 135nA or 70nA and the RTCC clock pauses. I've looked at both the firmware and hardware setup. The crystal I selected has an ESR of 80kOhm, 10k more than the max I realised, could this be the issue? I haven't got as far as putting a scope on the crystal to see what's happening. Here is a copy of the Config Bits: // CONFIG4 #pragma config DSWDTPS = DSWDTPS1F // Deep Sleep Watchdog Timer Postscale Select bits (1:68719476736 (25.7 Days)) #pragma config DSWDTOSC = LPRC // DSWDT Reference Clock Select (DSWDT uses LPRC as reference clock) #pragma config DSBOREN = OFF // Deep Sleep BOR Enable bit (DSBOR Enabled) #pragma config DSWDTEN = OFF // Deep Sleep Watchdog Timer Enable (DSWDT Enabled) #pragma config DSSWEN = ON // DSEN Bit Enable (Deep Sleep is controlled by the register bit DSEN) #pragma config PLLDIV = DISABLED // USB 96 MHz PLL Prescaler Select bits (PLL Disabled) #pragma config I2C1SEL = DISABLE // Alternate I2C1 enable bit (I2C1 uses SCL1 and SDA1 pins) #pragma config IOL1WAY = ON // PPS IOLOCK Set Only Once Enable bit (Once set, the IOLOCK bit cannot be cleared) // CONFIG3 #pragma config WPFP = WPFP127 // Write Protection Flash Page Segment Boundary (Page 127 (0x1FC00)) #pragma config SOSCSEL = ON // SOSC Selection bits (Digital (SCLKI) mode) #pragma config WDTWIN = PS25_0 // Window Mode Watchdog Timer Window Width Select (Watch Dog Timer Window Width is 25 percent) #pragma config PLLSS = PLL_PRI // PLL Secondary Selection Configuration bit (PLL is fed by the Primary oscillator) #pragma config BOREN = OFF // Brown-out Reset Enable (Brown-out Reset Enable) #pragma config WPDIS = WPDIS // Segment Write Protection Disable (Disabled) #pragma config WPCFG = WPCFGDIS // Write Protect Configuration Page Select (Disabled) #pragma config WPEND = WPENDMEM // Segment Write Protection End Page Select (Write Protect from WPFP to the last page of memory) // CONFIG2 #pragma config POSCMD = HS // Primary Oscillator Select (HS Oscillator Enabled) #pragma config WDTCLK = LPRC // WDT Clock Source Select bits (WDT uses LPRC) #pragma config OSCIOFCN = OFF // OSCO Pin Configuration (OSCO/CLKO/RA3 functions as CLKO (FOSC/2)) #pragma config FCKSM = CSDCMD // Clock Switching and Fail-Safe Clock Monitor Configuration bits (Clock switching and Fail-Safe Clock Monitor are disabled) #pragma config FNOSC = PRI // Initial Oscillator Select (Primary Oscillator (XT, HS, EC)) #pragma config ALTCMPI = CxINC_RB // Alternate Comparator Input bit (C1INC is on RB13, C2INC is on RB9 and C3INC is on RA0) #pragma config WDTCMX = WDTCLK // WDT Clock Source Select bits (WDT clock source is determined by the WDTCLK Configuration bits) #pragma config IESO = OFF // Internal External Switchover (Disabled) // CONFIG1 #pragma config WDTPS = PS32768 // Watchdog Timer Postscaler Select (1:32,768) #pragma config FWPSA = PR128 // WDT Prescaler Ratio Select (1:128) #pragma config WINDIS = OFF // Windowed WDT Disable (Standard Watchdog Timer) #pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT disabled in hardware; SWDTEN bit disabled) #pragma config ICS = PGx1 // Emulator Pin Placement Select bits (Emulator functions are shared with PGEC1/PGED1) #pragma config LPCFG = OFF//ON // Low power regulator control (Disabled - regardless of RETEN) #pragma config GWRP = OFF // General Segment Write Protect (Write to program memory allowed) #pragma config GCP = OFF // General Segment Code Protect (Code protection is disabled) #pragma config JTAGEN = OFF // JTAG Port Enable (Disabled) |
|
相关推荐
4个回答
|
|
只是一个快速更新,我已经把备用电池换成了一个新的,电压是3V。RTCC问题已经消失了,但是PIC规格状态VBAT可以运行到1.6V。这暗示了我选择XTAL可能会有问题吗?
以上来自于百度翻译 以下为原文 Just a quick update, I've swapped the backup battery with a new one with voltage measured at 3V. The RTCC issue has disappeared, however the PIC spec states vBAT can operate down to 1.6V. Is this hinting that I might have an issue with the XTAL I've selected? |
|
|
|
我使用外部RTC’。你不必担心PIC资源。DS323甚至不需要XTAL使它准确。我想看到一个甚至不需要电池。
以上来自于百度翻译 以下为原文 I use external rtc's. You don't have to worry about pic resources. The DS3231 doesn't even need an xtal making it accurate. I'd like to see one that does not even need a battery. |
|
|
|
我已经尝试了一系列XTAL现在ESR为50K,仍然有同样的问题。我看不出我做错了什么。有没有人设法使内部RTCC工作可靠地离开VBAT?
以上来自于百度翻译 以下为原文 I have tried a range of Xtals now with ESR of 50k. Still have the same problem. I cant see what I'm doing wrong. Has anyone managed to get the internal RTCC working reliably off vBAT? |
|
|
|
看来我偶然发现了问题的原因。我有一个1秒的中断由RTCC产生。我得到了中断,打印出每秒的时间超过串行通信作为调试的一部分。这很快验证RTCC是否在从PIC中拔出电源之后运行,或者在将来某个时间重新应用。做这个测试表明,RTCC时钟暂停,工作良好或完全停止。这是有趣的事情,我观察到,真正的冰插入到PIC,可靠性更好。不完美。拔掉它和VBAT操作是可怕的。长话短说,它看起来像电源中的电容使PIC在电源拖动后保持很长时间,真正的冰似乎使电压下降得更快。因此,我的第一个想法是,为了使PIC优雅地切换到VBAT模式,必须进行棕色输出重置。当电源被拉动时,很快就会被破坏。我打开它,触摸木头,看起来这个问题已经解决了。我没有看到任何关于RANC和VBAT在互联网上任何地方使用的Brown out重置,所以希望这个信息对某人有用。
以上来自于百度翻译 以下为原文 Looks like I have stumbled across the cause of the problem. I have a 1 second interrupt generated by the RTCC. I got the interrupt to print out the time every second over serial comms as part of my debugging. This quickly verifies if the RTCC was running off vBat or not when power is pulled from the PIC then reapplied at some time in the future. Doing this test showed the RTCC clock pausing, working fine or stopping completely. Here is the interesting thing I observed, with the REAL ICE plugged in to the PIC, reliability was better. Not perfect. Unplugged it and the vBat operation was terrible. To cut a long story short it looks like capacitance in my power supply keeps the PIC alive for too long after the power is pulled, the REAL ICE seems to bring the voltage down more quickly. So my first thought was that a Brown Out reset must be needed to get the PIC to gracefully switch to vBAT mode quickly when power is pulled. Brown Out reset has been disabled throughout my testing. I switch it on and touch wood it looks like the problem has been fixed. I have not seen any mention of Brown Out Reset being used with RTCC and vBAT anywhere on the internet, so hopefully this info will be of use to someone. |
|
|
|
只有小组成员才能发言,加入小组>>
5161 浏览 9 评论
1999 浏览 8 评论
1928 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3171 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2226 浏览 5 评论
731浏览 1评论
613浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
503浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
629浏览 0评论
527浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 19:36 , Processed in 1.443155 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号