公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
风行者
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted
1.先关闭busoff恢复,然后造busoff的故障 2.去读取CAN_NSRx寄存器的BOFF位,一直为0 现在想做busoff的快慢恢复策略,就想通过进入busoff的状态标志位来做相应的策略,但是现在找不到相关的标志位。难道不是这个?
0 点赞
6 回复数
YuanLi
Level 5
Level 5
busoff应该会触发一个中断,然后处理就行了
0 点赞
风行者
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted
触发的前提肯定有busoff标志位吧,想知道这个标志位是哪个。另外你说的中断是自带配置好了的么
0 点赞
YuanLi
Level 5
Level 5
自己开启就行了
0 点赞
harvis
Level 5
Level 5
10 solutions authored First like received First like given
Bus-off error check: --------------------- The ALERT bit is set upon the occurrence of one of the following events (the same events which also trigger an alert interrupt if ALIE is set): 1. A change of bit NSRx.BOFF 2. A change of bit NSRx.EWRN 3. A List Length Error, which also sets bit NSRx.LLE 4. A List Object Error, which also sets bit NSRx.LOE 5. Bit INIT has been set by hardware Note: - List error occurance is ruled out because list is not changed at run time by the driver. So LOE and LLE bits need not be checked. - Points 1,2 and 5 constitute BusOff condition In the driver EWRN level is set to be equal to BOFF error level. So when EWRN triggers ALERT bit, it also means bus-off. When bus-off happens, INIT is set by "hardware". So is it enough to check ALERT bit alone to see if there was bus-off event triggered? No. Resetting of EWRN and/or BOFF also triggers ALERT bit to be set. To differentiate this scenario, both ALERT and INIT bit should be checked.
0 点赞
独秀一郎
Level 5
Level 5
Welcome! 50 comments on blog 25 comments on blog
寄存器CAN_NCR的INIT位就是来恢复BUSOFF故障的,置1即可
0 点赞
独秀一郎
Level 5
Level 5
Welcome! 50 comments on blog 25 comments on blog
你用寄存器CAN_NCR的INIT位来判断BUSOFF故障试试看。
0 点赞