你好,
我想你将CTRL寄存器中的BOFF_REC位设置为1以避免自动恢复。
无论如何,您可以在执行期间使用此位来捕获总线关闭中断,如下所述。
总线关闭恢复模式
此位定义FlexCAN如何从总线关闭状态恢复。如果该位被否定,则自动
根据CAN规范2.0B,从总线关闭状态恢复。如果是的话
断言,从总线关闭自动恢复被禁用,模块保持在总线关闭状态
直到该位被用户否定。如果否定发生在11个隐性的128个序列之前
在CAN总线上检测到位,然后发生总线关闭恢复,就像BOFF_REC位一样
从未被断言过。如果在发生了11个隐性位的128个序列之后发生否定,
然后,FlexCAN将在加入总线之前等待11个隐性位,从而重新同步到总线。
在否定之后,BOFF_REC位可以在总线关闭期间再次重新置位,但它只会是
下次模块进入总线关闭时生效。如果BOFF_REC在模块时被否定
进入总线关闭状态,在总线关闭期间置位它将对当前的总线关闭恢复无效。
0根据CAN Spec 2.0 B部分,从总线关闭状态启用自动恢复。
1从Bus Off状态自动恢复禁用.Regards,
Procolo
以上来自于谷歌翻译
以下为原文
Hello,
I suppose you set BOFF_REC bit in CTRL register to 1 in order to avoid automatically recovery.
Anyway you can use this bit during execution when catching a bus off interrupt as reported below.
Bus Off Recovery Mode
This bit defines how FlexCAN recovers from Bus Off state. If this bit is negated, automatic
recovering from Bus Off state occurs according to the CAN Specification 2.0B. If the bit is
asserted, automatic recovering from Bus Off is disabled and the module remains in Bus Off state
until the bit is negated by the user. If the negation occurs before 128 sequences of 11 recessive
bits are detected on the CAN bus, then Bus Off recovery happens as if the BOFF_REC bit had
never been asserted. If the negation occurs after 128 sequences of 11 recessive bits occurred,
then FlexCAN will resynchronize to the bus by waiting for 11 recessive bits before joining the bus.
After negation, the BOFF_REC bit can be re-asserted again during Bus Off, but it will only be
effective the next time the module enters Bus Off. If BOFF_REC was negated when the module
entered Bus Off, asserting it during Bus Off will not be effective for the current Bus Off recovery.
0 Automatic recovering from Bus Off state enabled, according to CAN Spec 2.0 part B.
1 Automatic recovering from Bus Off state disabled.Regards,
Procolo
你好,
我想你将CTRL寄存器中的BOFF_REC位设置为1以避免自动恢复。
无论如何,您可以在执行期间使用此位来捕获总线关闭中断,如下所述。
总线关闭恢复模式
此位定义FlexCAN如何从总线关闭状态恢复。如果该位被否定,则自动
根据CAN规范2.0B,从总线关闭状态恢复。如果是的话
断言,从总线关闭自动恢复被禁用,模块保持在总线关闭状态
直到该位被用户否定。如果否定发生在11个隐性的128个序列之前
在CAN总线上检测到位,然后发生总线关闭恢复,就像BOFF_REC位一样
从未被断言过。如果在发生了11个隐性位的128个序列之后发生否定,
然后,FlexCAN将在加入总线之前等待11个隐性位,从而重新同步到总线。
在否定之后,BOFF_REC位可以在总线关闭期间再次重新置位,但它只会是
下次模块进入总线关闭时生效。如果BOFF_REC在模块时被否定
进入总线关闭状态,在总线关闭期间置位它将对当前的总线关闭恢复无效。
0根据CAN Spec 2.0 B部分,从总线关闭状态启用自动恢复。
1从Bus Off状态自动恢复禁用.Regards,
Procolo
以上来自于谷歌翻译
以下为原文
Hello,
I suppose you set BOFF_REC bit in CTRL register to 1 in order to avoid automatically recovery.
Anyway you can use this bit during execution when catching a bus off interrupt as reported below.
Bus Off Recovery Mode
This bit defines how FlexCAN recovers from Bus Off state. If this bit is negated, automatic
recovering from Bus Off state occurs according to the CAN Specification 2.0B. If the bit is
asserted, automatic recovering from Bus Off is disabled and the module remains in Bus Off state
until the bit is negated by the user. If the negation occurs before 128 sequences of 11 recessive
bits are detected on the CAN bus, then Bus Off recovery happens as if the BOFF_REC bit had
never been asserted. If the negation occurs after 128 sequences of 11 recessive bits occurred,
then FlexCAN will resynchronize to the bus by waiting for 11 recessive bits before joining the bus.
After negation, the BOFF_REC bit can be re-asserted again during Bus Off, but it will only be
effective the next time the module enters Bus Off. If BOFF_REC was negated when the module
entered Bus Off, asserting it during Bus Off will not be effective for the current Bus Off recovery.
0 Automatic recovering from Bus Off state enabled, according to CAN Spec 2.0 part B.
1 Automatic recovering from Bus Off state disabled.Regards,
Procolo
举报