完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嘿,大家好!我使用API24HJ64 GP506A进行一个项目,并有一个架构问题。该PIC用于通过串行连接启用/禁用各种外部组件(通过GPIO)。在WDT超时/重置(例如,由于软件错误)的情况下,理想的是,在检查RCON和检测WDT重置之后,我希望保持TrIS/LAT配置。我知道在任何重置事件中,所有TRIS寄存器都被重置为输入。这可能会导致各种下游组件的电源可能出现错误状态。我的第一个解决方案是追踪导致WDT重置的错误并防止重置再次发生。不管怎样,我仍然希望WDT保护能够防止潜在的锁定。我曾经想到的一种解决方案是使用三态缓冲器,其中缓冲器输出值在主动驱动时才改变。这将保持输出值,直到PIC完全重新初始化。另一个建议的解决方案是使用连接到高优先级中断的外部看门狗电路。在这个ISR中,我可以重置主循环的PC到主程序的开头()。我不确定到底该怎么做,或者是否有可能。有没有其他人遇到过这种情况,或者有什么想法可以帮助?谢谢,伊北
以上来自于百度翻译 以下为原文 Hey everyone! I am using a PIC24HJ64GP506A for a project and have an architectural problem. This PIC is used to enable/disable various external components (via GPIO) over a serial connection. In the event of a WDT timeout/reset (due to a software bug for example), ideally I would want to maintain the TRIS/LAT configuration after inspecting RCON and detecting a WDT reset. I know that during any reset event, all TRIS registers are reset to inputs. This can cause blips in the power to the various downstream components which may leave them in a bad state. My first solution will be to track down the bug that is causing the WDT reset and prevent the reset from ever happening again. Regardless of this, I still want the WDT protection against potential lockups. One solution I've thought of is using a tri-state buffer of sorts, where the buffer output value is only changed when it is actively driven. This would maintain the output value until the PIC has fully reinitialized. Another proposed solution is to use an external watchdog circuit connected to a high priority interrupt. In this ISR, I could reset the PC of the main loop to the beginning of main(). I am not sure exactly how I would do this or if it is possible at all. Has anyone else come across this scenario or have any ideas that could help? Thanks, Nate |
|
相关推荐
6个回答
|
|
PIC无法做到这一点。它们都不能。你可以用外部锁存器来做。你应该解决你的WDT问题。
以上来自于百度翻译 以下为原文 The PIC can Not do this. None of them can. You could do it with external Latches. You should Fix your WDT problem. |
|
|
|
嗨,TRISx注册在所有的PIC设备在任何重置,包括WDT的高Z三态。你可以使用被动拉上或下拉来保持信号电平时,没有信号,最终外部闩锁与被动上拉/下拉使能线。外部或内部看门狗不锍。R,要解决的任务是相同的。迈西尔
以上来自于百度翻译 以下为原文 Hi, TRISx registers in all PIC devices go to High Z tristate on any Reset, including WDT. You may use passive Pull-Up or Pull-Down to maintain signal level when there is no signal, eventually external latches with passive pull-up / pull-down on Enable lines. External or internal watchdog doesn't matter, the task to be solved is the same. Mysil |
|
|
|
有人会变得棘手吗?从WDT ISR,重置堆栈,跳转到开始地址,这将像一个复位没有复位。可能有一些细节来解决。
以上来自于百度翻译 以下为原文 What about one getting tricky? from the WDT ISR, reset the stack, jump to the start address, which would be like a reset without the reset. probably some details to figure out. |
|
|
|
嗨,“细节”可能是非常困难的,如果不是不可能的解决方案。
以上来自于百度翻译 以下为原文 Hi, the "details" could be very difficult if not impossible to resolve Regards |
|
|
|
“细节”可能是非常困难的,如果不是不可能的解决办法,“细节”是我正在努力的一部分。以前有人做过这件事吗?我倾向于使用外部锁存器,但我的同事谁做板布局要我调查“软复位”,因为它将是更简单的电路/更少的路由…软件与硬件之间的永恒斗争:
以上来自于百度翻译 以下为原文 the "details" could be very difficult if not impossible to resolve Regards The "details" are the part I'm struggling with. Has anyone else done this before? I'm leaning towards using an external latch but my co-worker who does the board layout wants me to investigate the "soft reset" since it would be simpler circuitry/less routing... the eternal struggle between software and hardware :) |
|
|
|
为什么不重新初始化所有下游电路,在任何重置的情况下,包括WDT重置?如果下游故障是可能的,你需要一种恢复的方法。例如,在PIC复位之后重新配置下一个流的电源。
以上来自于百度翻译 以下为原文 Why not just to re-initialize all downstream circuits in case of any reset including the WDT reset? If downstream glitch is possible at all you need a way to recover. For example cycle the power except the PIC after it's reset and reconfigure the downstreams. |
|
|
|
只有小组成员才能发言,加入小组>>
5238 浏览 9 评论
2028 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3204 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
774浏览 1评论
664浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
592浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
674浏览 0评论
574浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 20:17 , Processed in 1.438869 second(s), Total 87, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号