I am using a 9S12XEP10 star12 processor and working with existing code.
I need to capture a range of 7 ARB IDs on a single CAN port. I am having trouble understanding how to use the CANIDAR0-7 and CANIDMR0-7 to make this work. I want to capture all messages in a group that only differ in the 3 lowest bits of the address. ie. 0-7. However, when I try to set them up, I only get the 0.
I am using the Processor Expert because the existing code was written that way, and the Acceptance mode was written for 2 32-bit address and mask register and the code is using STD and XTD modes. The code works for capturing a single ARB-ID, but I don't seem to have it correct for multiple ARB-IDs. Also, the default MASKs is as follows:
- STD 0x70007u
- XTD 0x70000u
What I need to know is:
- Why does the '7' appear twice in the STD mask?
- For my specific example should STD be 0x3F003Fu and XTD 0x3F0000u?
- Should my Identifier value, again for STD, be (id<<21 | id<<3?) or (id << 21)?