Example: Program the AFMR and AFIR for Standard Frames

Zynq UltraScale+ Device Technical Reference Manual (UG1085)

Document ID
UG1085
Release Date
2023-12-21
Revision
2.4 English

This example sets up the acceptance filter for standard frames. The frame ID number is shown as 55Eh, but could be set to a specific value based upon your application.

1.Configure the filter mask for standard frames. Write FFF8_0000h to the can.AFMR register.

a.Enable the compare for the standard message ID, [AMIDE] = 1.

b.Compare all bits in the standard message ID, [AMIDH] = 7FFh.

c.Enable the compare for substitute remote transmission request, [AMSRR] = 1.

d.Zero-out the extended frame bits, [AMIDL, AMRTR] = 0.

2.Configure the filter ID for standard frames. Write ABC0_0000h to the can.AFIR register.

a.Select the standard frame message mode, [AIIDE] = 0.

b.Program the standard message ID, [AIIDH] = 55Eh.

c.Disable substitute remote transmission request, [AISRR] = 0.

d.Zero-out extended frame bits, [AIIDL, AIRTR] = 0.