完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
你好,
我们目前正在为SPC560D40L1开发LIN-Slave驱动程序。到目前为止,硬件id过滤器的使用变得容易,但现在我们在最后一次测试中失败,我们必须区分是否在报头或响应中发生了帧错误。 有没有办法在激活id过滤的情况下区分帧错误中断中的这两个事件? 先谢谢你! 最好的祝福 托本 #lin#spc560d #framing-error #linflex 以上来自于谷歌翻译 以下为原文 Hello, we are currently working on a LIN-Slave Driver for the SPC560D40L1. The use of the hardware-id-filter have made it easy so far but now we fail in one last test where we must distinguish whether the framing error has occurred in the header or in the response. Is there a way to distinguish these two events in the framing error interrupt with id-filtering activated? Thank you in advance! Best regards Torben #lin #spc560d #framing-error #linflex |
|
相关推荐
8个回答
|
|
|
你好Torben,
是的你可以。 在RM0045的第20章中 你应该启用相应的中断 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Torben, Yes you can. in the chapter 20 from the RM0045 you should enable the corresponding interrupt Best regards Erwan |
|
|
|
|
|
你好Torben,
RM不清楚。 也许,在SPC560Dxx系列的IDPEF标志中触发标头错误中断 你能试试吗? 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Torben , the RM is not clear. maybe , the Header error Interrupt is triggered in IDPEF Flag for SPC560Dxx Family Could you try this ? Best Regards Erwan |
|
|
|
|
|
你好Torben,
经专家核实后, 对于标头错误中断,您需要检查标志SFEF,BDEF和IDPEF 对于帧错误中断,您需要检查标志FEF 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Torben , After checking with experts , For header Error Interrupt, you need to check the flag SFEF , BDEF and IDPEF For Framing Error Interrupt, you need to check the flag FEF Best Regards Erwan |
|
|
|
|
|
你好,Erwan,
我们尝试了你的建议,但我们仍然无法确定标头的标识符或响应的一个数据字节中是否发生了帧错误。 以上来自于谷歌翻译 以下为原文 Hello Erwan, we tried your suggestion but we still couldn't find out if a framing error has occurred in the identifier of the header or in one of the data bytes of the response. |
|
|
|
|
|
你好,Erwan,
是的,我们检查了一下。 例如,IDPEF标志似乎仅用于奇偶校验错误,并且与帧错误无关。 根据LIN规范,必须以不同方式处理奇偶校验错误。 最好的祝福, 托本 以上来自于谷歌翻译 以下为原文 Hello Erwan, yes, we checked it. It seems like the IDPEF flag, for example, is only for parity errors and is not related to a framing errror. Parity errors must be handled differently according to the LIN spec. Best Regards, Torben |
|
|
|
|
|
根据RM,
FEF是相对的旗帜 SFEF或BDEF或IDPEF位是相对于的标志 你检查了其他旗帜吗? BR 二万 以上来自于谷歌翻译 以下为原文 According to the RM , FEF is the flag relative to SFEF or BDEF or IDPEF bit is the flag relative to Did you check the others flags ? BR Erwan |
|
|
|
|
|
Erwan Y schrieb:
FEF是相对的旗帜 SFEF或BDEF或IDPEF位是相对于的标志 你好,Erwan, 这是正确的,但只有在标题中发生帧错误时才会设置SFEF,BDEF或IDPEF。 我们所做的是: 首先,我们激活了上述所有这些中断,并使用我们的矢量工具在标头字段中发送了一个带有帧错误的帧,该帧位于标题中: 这引发了错误中断并且设置了帧错误标志。但没有其他旗帜。根据LIN 2.1规范,我们必须忽略这个错误。 在第二步中,我们在第一个数据字段中发送了一个带有帧错误的帧。 SPC表现出完全相同的行为。但根据Lin 2.1规范,我们必须设置响应错误位。 我们的测试显示,当其中一个标题字段中存在位错误时,SFEF,BDEF或IDPEF标志会被设置,但这不是我们对此特定情况所需的。 我们看到的唯一机会是不使用hardware-lin-id-filter,处理id Interrupt而不激活帧错误,然后激活它。如果可能,我们希望避免这种情况,因为更高的中断负载和更复杂的代码。 最好的祝福 托本 以上来自于谷歌翻译 以下为原文 Erwan Y schrieb: FEF is the flag relative to SFEF or BDEF or IDPEF bit is the flag relative to Hello Erwan, that's right but the SFEF, BDEF or IDPEF are not set when only a framing error occurred in the Header. What we have done is following: First we activated all of these above mentioned Interrupts and used our Vector tool to sent a frame with a framing error in the Identifier Field, which is in the Header: This raised an error Interrupt and the framing error flag was set. But no other flag. According to LIN 2.1 spec we must ignore this error. In a second step we sent a frame with a framing error in the first data field. The SPC showed exactly the same behaviour. But according to Lin 2.1 spec we must set the response error bit. Our tests showed that the SFEF, BDEF or IDPEF Flags are set when there are bit errors in one of the header fields but this is not what we need for this particular case. The only opotunity we see, would be not to use the hardware-lin-id-filter, handle the id Interrupt without activated framing error and activate it afterwards. If possible, we would like to avoid this, because of higher Interrupt load and more complexity in the code. Best Regards Torben |
|
|
|
|
|
你好Auhagen,
你需要在寄存器中检查 LINESR: 如果是SFEF,SDEF,IDPEF,则错误是标题。 如果是BEF或NF,错误就在奴隶的答案中。 如果是OCF,CEF,FEF或NF,则错误在主人的答案中。 如果是BOF,意味着在下一个答案即将到来之前你还没有读过答案大师 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Auhagen , you need to check that in the register LINESR : if SFEF, SDEF, IDPEF, the error is the header. if BEF or NF, the error is in the answer of the slave. if OCF,CEF,FEF or NF, the error is in the answer of the master. if BOF, means that you have not read the answer master before that the next answer is coming Best regards Erwan |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1453 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1502 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3649 浏览 1 评论
3842 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2461 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
727浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
663浏览 5评论
710浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
941浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
745浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 07:24 , Processed in 0.816516 second(s), Total 86, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
398