Hi,
i have the need to monitor a lot a CAN IDs. Is this possible with the can Stack of the FSP Configuration.
I have the need to check the can message regardless which CAN Identifier is used. Therefore I can not assign a CAN ID to the mailboxes.
Thanks Michael
You can send a message to each and see if they respond.
Or are you saying each CAN slave node is going to try to talk to you - the master?
Not clear what you're asking.
Hello,
Do you want a mailbox to 'listen' to multiple CAN IDs ?
Certainly the hardware supports this by opening up the acceptance filtering where the CAN-ID completely masked.
It would seem to me that if you don't need anything else from the FSP CAN stack, then you would be better off using your own simplified CAN stack since it isn't doing much of anything beyond pushing all msgs to a common handler.
Do you know the numbers of the IDs you want to monitor? Are they in a convenient group, or spread all over the place? Are there IDs that you want to ignore?
The acceptance filtering is pretty smart, for instance, if you want to monitor 256 IDs starting at a certain number then you can route them all to ne mailbox using the filters.
Never knew that. Is that kind of filtering built into the HW?
Larry
Yes.
If you set the bit in the MASK INVALID register, then the mailbox only accepts messages where the message ID matches the number in the ID register.
The same thing happens if you set the mask to 0x1FFFFFFF and clear the bit in the MASK INVALID register.
This is where it gets clever. If you set the mask to 0x1FFFFF00, and put 0x12345600 in the ID register then it will accept all messages from 0x12345600 to 0x123456FF, and the actual number of the ID of the message will be put in the ID register, so you can read it to find the ID of the message.
The snag is that there are only 8 Mask registers, NOT one for each mailbox, so you have to be quite strategic how you use the mailboxes.
yes i want a mailbox to "listen" to multiple CAN IDs
You can set a group mask to allow all CAN IDs:
If all bits are '1' then the mailbox can listen only to one ID (fully masked).
If all or some bits are '0' then the mailbox can listen to multiple IDs depending on the mask.
The above option sets the MKR registers: