完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我正在尝试使用PIC32 MX470设备来构建一个项目,它在单元首次打开时发送SMS TXT消息。我正在检查寄存器RCON,我可以看到,上电后它包含0xC000 000 08.这是奇怪的,因为数据表上的16位应该所有的电源作为“0”。无论如何,83部分告诉我这是一个MCLR重置(EXT),一个Brown out(BOR)和一个上电复位(POR)。我的问题是,当我用一个ICD3重新编程PIC时,它重新启动,并给我0x000 000,这是一个MCLR复位(EXT)和一个上电复位(POR)。现在,我不希望它在重新编程后发送TXT,因为我在开发/调试期间做了很多次。看来我必须依靠Bor标志来判断它是否是真正的电能。(我在读了所有的标志之后就清除了所有的标志,所以这不是最后一次重置的遗留)。因为重新编程不是电源,所以我似乎错了,我可以理解MCLR(EXR),因为ICD3可能在重新编程后确实做了MCLR(真实的或模拟的),但我不希望POR是。SET,这是一个可以在ICD3控件中编程的特性吗?我已经看过了,但是我找不到任何东西。任何人的想法或建议都会得到感激……
以上来自于百度翻译 以下为原文 Hi, I am trying to build a project using a PIC32MX470 device that sends an SMS TXT message when the unit is first switched on. I am examining the register RCON and I can see that after power up it contains 0xC0000083 which is odd because the datasheet says those upper 16 bits should all power on as '0'. Anyway the 83 part tells me it was an MCLR reset (EXTR), a Brown Out (BOR) and a Power On Reset (POR). My problem is that when I reprogram the PIC using an ICD3 it restarts and gives me 0x00000081 which is an MCLR reset (EXTR) and a Power On Reset (POR). Now I don't want it to send the TXT after reprogramming since I do this many times during development/debugging. It would seem I have to rely on the BOR flag to tell if it is a true power-up. (I do clear all the flags after reading them so it isn't a hangover from the last reset). Itseems wrong to me since re-programming is not a power on, I can understand the MCLR (EXTR) since ICD3 probably does do an MCLR (either real or simulated) after re-programming but I don't expect the POR to be set, is this a feature that can be programmed in the ICD3 control? I've looked but I can't find anything. Anyone's thoughts or suggestions would be gratefully received... PhilipJ |
|
相关推荐
1个回答
|
|
在RAM中的绝对位置使用签名数组。在复位后检查签名是否存在。如果是这样的话,它就不是一个上电。否则,发送SMS并将签名写入RAM。您也可以为此使用一个持久数组,但确保它处于绝对地址,否则它可能在开发周期之间移动。/ Ruben
以上来自于百度翻译 以下为原文 Use a signature array at an absolute location in ram. Check if the signature is there after a reset. If so, it is not a power-up. Otherwise send the SMS and write the signature to ram. You can also use a persistent array for this but make sure it is at an absolute address otherwise it might move between development cycles. /Ruben |
|
|
|
只有小组成员才能发言,加入小组>>
5234 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3201 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
771浏览 1评论
659浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
588浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
670浏览 0评论
571浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 12:17 , Processed in 1.180042 second(s), Total 79, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号