XEP100 CAN PROBLEM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

XEP100 CAN PROBLEM

777 次查看
mingyuanjeng
Contributor I

I use ADC to detect 12V power supply drops to 8V,then close the CAN TX

If the interrupt  buffer have data,the MCU still to complete CAN transmit

At this moment the voltage drop,the MCU can not working

It might cause the CAN ERROR FRAME

How to solve this problem?

标签 (1)
0 项奖励
回复
3 回复数

657 次查看
lama
NXP TechSupport
NXP TechSupport

Let me think about your issue.

There are 3 Tx buffers. There is a possibility to abort any message while it is not in physical Tx buffer.

So, the easiest way is to

  1. 1) Design system to be able to finish ongoing transition till voltage drops down to the lowest acceptable level. (suitable capacitor design, interrupt priority usage, proper finalizing procedure,….)
  2. 2) Abort all messages which are in remaining Tx buffers.

Abort Request — The CPU sets the ABTRQx bit to request that a scheduled message buffer (TXEx = 0) be

  1. aborted. The MSCAN grants the request if the message has not already started transmission, or if the

transmission is not successful (lost arbitration or error). When a message is aborted, the associated TXE (see

Section 16.3.2.7, “MSCAN Transmitter Flag Register (CANTFLG)”) and abort acknowledge flags (ABTAK, see

Section 16.3.2.10, “MSCAN Transmitter Message Abort Acknowledge Register (CANTAAK)”) are set and a

transmit interrupt occurs if enabled. The CPU cannot reset ABTRQx. ABTRQx is reset whenever the associated

TXE flag is set.

Initialization Mode Request — When this bit is set by the CPU, the MSCAN skips to initialization mode (see

Section 16.4.4.5, “MSCAN Initialization Mode”). Any ongoing transmission or reception is aborted and

synchronization to the CAN bus is lost. The module indicates entry to initialization mode by setting INITAK = 1

(Section 16.3.2.2, “MSCAN Control Register 1 (CANCTL1)”).

Best regards,

  Ladislav

0 项奖励
回复

657 次查看
mingyuanjeng
Contributor I

So when I detect 12V  drops to 8V,then close the CAN TX and set ABTRQ=7(Abort all messages which are in remaining 3 Tx buffers)

Is it right?

0 项奖励
回复

657 次查看
lama
NXP TechSupport
NXP TechSupport

Yes, but if any of messages is already ongoing then the abort relates to remaining two and you have to ensure finalizing of ongoing message.

Best regards,

Ladislav

0 项奖励
回复