我有一个在PSoC 4200 L中使用CAN控制器的设计。该组件的数据表表示,当总线关闭重启选项被设置为手动时,如果总线被关闭,用户/代码必须重新启动CAN。要重新启动CAN组件,究竟需要做些什么?
我通过启用消息发送、消息接收和总线关闭中断来测试重新启动CAN,然后短路CAN线和高线,然后发送消息。我得到一个总线中断,然后尝试重新启动CAN使用CANEXEABLE()API函数(CANIN IN)和CANYSTARTEXOR()在初始化过程中调用。在总线关闭中断停止射击之后(在3-4次调用到CujEnable()之后,我不短路低端和高线,尝试发送另一条消息,但是在总线上没有看到任何使用逻辑分析仪的消息。除了调用CANEnEnable()之外,还有什么我需要做的事情来重新启动CAN吗?
以上来自于百度翻译
以下为原文
I have a design which uses the CAN controllers in a PSoC 4200L. The datasheet for the component says that when the Bus-off restart op
tion is set to Manual, if the bus is turned off, the user/code must restart the CAN. What exactly needs to be done to restart the CAN component?
I am testing restarting the CAN by enabling Message Transmitted, Message Received, and Bus Off interrupts, then shorting the CAN low and high wires, then sending a message. I get a bus off interrupt, then try to restart the CAN using the CAN_Enable() API function (CAN_Init() and CAN_StartEx() were called during initialization). After the bus off interrupt stops firing (after 3-4 calls to CAN_Enable()), I un-short the low and high wires and try to send another message, but I don't see any messages on the bus using a logic analyzer. Is there something more I need to do other than call CAN_Enable() to restart the CAN?
0