1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
HiCPU:dsPIC30F5015 MPLAB XXC16:v1.26ICD3I有一个由两个处理器A和C组成的系统,它们通过半双工RS485线路相互通信。因为两边都是半双工的,所以大部分时间都在监听,但是C每半秒就发送一个“ping”。当系统启动时,A处理器对这个“ping”作出响应,并带有“ACK”消息(这也意味着A和B在发送时需要改变各自RS 465收发信机上的“方向”)。半双工发送和接收工作大约4秒钟,然后A停止对来自C的ping的响应。我可以看到C处理器上的发送和接收通过两个闪光的LED进行,闪光灯位于“C处理器RS 485收发信机内,即直接在C处理器UART传输上”。奇怪的是,如果我在第一个字节被写到U1TXREG之前在一行上设置断点(在A的源代码中,在A已经“停止”之后),A就发送响应(如果我继续按IDE中的运行按钮,A就继续发送消息),但是如果我设置了当A应该已经发送了所有字节时,A处理器不发送消息。为什么A发送只在启动时“工作”大约4秒钟,并且只有当我使用断点时才继续?有没有看到这个,有一些硅勘误表可以帮助我吗?ICD3“冻结外围设备”重载CPU吗?问候/斯特凡
以上来自于百度翻译 以下为原文 Hi CPU: dsPIC30F5015 MPLAB X XC16: v1.26 ICD3 I have a system here consisting of two processors, A and C, which are communicating with each other via a half duplex RS485 line. Because of the half duplex both sides most of the time is listening but C sends a "pings" every half second. The A processor respond on this "ping" with an "ACK" message (this also means that A and B need to change "direction" on their respective RS 465 transceiver when sending) When the system starts the half duplex sending and receiving works for some 4 seconds and then the A stops responding on the ping from C. I can see the transmit and receive on the C processor via two LED's that flashes that sits "inside the C processor RS 485 transceiver, that is directly on the C processor UART transmit and receive pins. The strange thing is that if I set a break point (in the source code for A after A have "stalled") on a line just before the first byte is written to U1TXREG the A sends it respond (and if I continue to press the run button in the IDE the A continue to send messages) but if I set a break point on a line when the A is supposed to have sent all bytes, the A processor is not sending the messages. How come the A sending only "works" for some 4 seconds at start up and only continue if I use a break point? Have any seen this, is there some silicon errata that might help me? Do the ICD3 "freeze peripherals" ghosting the CPU ? Regards /Stefan |
|
相关推荐
5个回答
|
|
可能是RS-485收发器的安装时间有点短吗?结合一些热效应,这可能可以解释为什么在Tx重置为“良好行为”之前断裂(我预计不会再持续4秒左右)。
以上来自于百度翻译 以下为原文 Could it be that the setup time for the RS-485 transceiver is a bit short? Combined with some thermal effects this might explain why breaking before Tx resets to 'good behavior' (that I'd expect to last no longer than another 4 seconds or so). |
|
|
|
是否有USAT错误检查?(如果不是,这将永远阻止你的串口)调试器,是的,它确实可以阻止外设…
以上来自于百度翻译 以下为原文 DO you have USART error checking in place? (if not, this could stop your serial port forever) The debugger, yes, indeed it could stop the peripherals... |
|
|
|
你好,我对此表示怀疑,切换到收发机模式的等待时间是1毫秒,而事实上,每样东西在最初4秒看起来都很好,这感觉不是“开关收发机”模式的问题。系统总是接通的,而且是可重复的。
以上来自于百度翻译 以下为原文 Hi I am sceptical to this, the wait time for switching to transceiver mode is 1 millisecond, and the fact that everything looks good the first 4 seconds it feels not being a "switch transceiver" mode problem. The system is switched on all the time and it is repeatable. |
|
|
|
是的,USART错误检查已经就位,我可以检查这些位,但是这意味着ICD3会在后台以不希望的方式影响USART(当它仅在断点停止时)。我会尝试旧的时尚学校,这是注释越来越多的代码,直到它只剩下UART代码。
以上来自于百度翻译 以下为原文 Yes, USART error checking is in place, I can check those bits but that means that the ICD3 would then affect the USART in the background (when it only stops at a breakpoint) in a undesired way. I am leaning towards the ICD3, but it must be some delayed effect because everything works at start up. I will try the old fashion school, that is comment away more and more code until it is only the UART code left. |
|
|
|
1毫秒翻译成多少指令?典型地,驱动器设置时间随(芯片)温度、工作电压等而变化。Re ICD3:如果没有监视窗口是活动的,并且dsPIC正在启动和运行,我不期望ICD3干扰。这也证实了TX断开后不会影响故障的事实。
以上来自于百度翻译 以下为原文 1 ms translates to how many THOUSANDS of instructions? Typically driver setup times vary with (chip) temperature, operating voltage etc. Re ICD3: if no watch window is active and the dsPIC is up and running, I do not expect the ICD3 to interfere. Which is also confirmed by the fact that breaking AFTER the Tx does not influence the malfunction. |
|
|
|
只有小组成员才能发言,加入小组>>
5242 浏览 9 评论
2031 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3207 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2256 浏览 5 评论
778浏览 1评论
668浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
595浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
677浏览 0评论
576浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 14:08 , Processed in 1.422204 second(s), Total 84, Slave 68 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号