cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

bezobraznic
New Contributor II

Hello all.

     I have N nodes on CANbus.  There is no any master node!  I need to make a roll call between blocks, so that each block always knows the total number of blocks on the bus.  I need some help with algorithm  how to do it.

Thanks!

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator

Hi AlMe_962021​,

Since CAN is a message based protocol, at protocol level, there is no mechanism to identify the number of nodes in the bus.

You could assign a unique device address to each of the CAN nodes (either as unique identifier or in one of the data frames), if the identifier matches you would receive an ACK/ response packet from the selected node, you could mark that as device is present.  However this technique would require you to use a host node that keeps tracks of the number of devices on the bus.

We would like to understand your application so that we understand why you need to count the number of nodes in the bus.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator

Hi AlMe_962021​,

Since CAN is a message based protocol, at protocol level, there is no mechanism to identify the number of nodes in the bus.

You could assign a unique device address to each of the CAN nodes (either as unique identifier or in one of the data frames), if the identifier matches you would receive an ACK/ response packet from the selected node, you could mark that as device is present.  However this technique would require you to use a host node that keeps tracks of the number of devices on the bus.

We would like to understand your application so that we understand why you need to count the number of nodes in the bus.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes