CAN Receiver Buffer size?

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

CAN Receiver Buffer size?

1,381 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akshimmu on Mon Apr 11 03:18:49 MST 2016
Im using the LPC1778 uC and the user manual claims this point : "The Receive Interrupt Bit is not cleared upon a read access to the Interrupt Register. Giving the Command “Release Receive Buffer” will clear RI temporarily.
If there is another message available within the Receive Buffer after the release
command, RI is set again. Otherwise RI remains cleared."
This statement is hinting the fact that there may be 2 receive buffers for when data is received over CAN.

Any idea as to whats the size of the receive buffer in CAN? Is it only 8 bytes before a data overrun occurs?
标签 (1)
0 项奖励
回复
4 回复数

1,327 次查看
lpcware
NXP Employee
NXP Employee
bump
0 项奖励
回复

1,327 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Tue Apr 12 19:01:06 MST 2016
You really need to read up on the receive buffer registers in the UM.
Along with any data, there will be the CAN address (11 or 29 bits), byte count, and some flags.

CAN is NOT just a stream of bytes. Read the CAN tutorial from the link I gave you.

Mike.
0 项奖励
回复

1,327 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akshimmu on Mon Apr 11 21:22:18 MST 2016
So CAN has 2 receive buffers, where each Receive Buffer can accommodate upto 8 bytes?
0 项奖励
回复

1,327 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Mon Apr 11 19:49:06 MST 2016
A single CAN message can have from zero to eight bytes of data. This is inherent in the CAN specification.
Look at figure 80 in section 20.5 of the user manual.
There are indeed two (and only two) receive buffers.

With CAN, you do not send a stream of bytes (however, application software can split the stream at source side
and rejoin it at receive side, but that is not CAN itself. c.f. TCP) but distinct message packets (each with up to 8 data bytes).

So the hardware has buffers for two CAN messages. It is up to the sender as to how many bytes are contained in each.

I hope that clarifies things a bit. Perhaps you need to read a backgrounder. Try this.
0 项奖励
回复