AN1105 STMicroelectronics, AN1105 Datasheet - Page 30

no-image

AN1105

Manufacturer Part Number
AN1105
Description
ST7 PCAN PERIPHERAL DRIVER
Manufacturer
STMicroelectronics
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN1105W-12-RR
Quantity:
13 804
Part Number:
AN1105W-22-RR
Manufacturer:
SANYO
Quantity:
8 570
Part Number:
AN1105W-TR
Manufacturer:
PANASONIC
Quantity:
27 995
Part Number:
AN1105W-TR
Manufacturer:
STANLEY
Quantity:
20 000
ST7 pCAN PERIPHERAL DRIVER
Now look at the can_custom.h file:
There are several #define statements, including:
#define INIT_FHRi 0x00
#define INIT_FLRi 0x00
where i is either 0 or 1.
These are the two registers containing hardware filters. In the FHRi register, the 8 MSBs for
the filters are given, and in the second register the 4 LSBs are given followed by 4 zeros.
We have to do the same thing for the mask. First, let’s write 0 for the filter.
Finally we have:
#define INIT_FHR0 0x80
#define INIT_FLR0 0x00
#define INIT_MHR0 0x9F
#define INIT_MLR0 0xE0
Doing the same thing with the other group of identifiers leads to:
#define INIT_FHR1 0x20
#define INIT_FLR1 0x20
#define INIT_MHR1 0xA9
#define INIT_MLR1 0x30
Software Filter Configuration
You need to use software filtering feature if the hardware cannot stop all the undesired identi-
fiers. Look at the following code in can_custom.h:
//SOFTWARE ACCEPTANCE MASKS
//#define FILTERS_ENABLED
//#define INIT_FILTERS {}
To allow software filtering, remove the “//” comment signs, and enter the identifiers between
the parentheses. Please note that the filters must be given in hexadecimal format with four
digits, always terminated by zero, and in increasing order.
That is to say in our case:
SOFTWARE ACCEPTANCE MASKS: optional choice
#define FILTERS_ENABLED
#define INIT_FILTERS {0x1270,0x3110,0x3a50,0x5000,0x6000}
Note: There can not be more than 127 identifiers in the array.
2.2.3 Implementing the Notification Functions
The cell is now configured, we no longer need to worry about hardware.
30/100

Related parts for AN1105