A method for setting CAN filter of Freescale MCU

A technology of filters and single-chip microcomputers, which is applied in the field of computer programming, can solve the problems of complex setting steps and inconvenient CAN filter setting circuits, and achieve the effects of fast setting speed, reduced human error, and simple and clear structure

Active Publication Date: 2019-06-25
山东汉格威新能源汽车电控制造有限公司
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example, the single-chip microcomputer needs to accept CAN standard frames whose IDs are 0x21, 0x57, and 0x43. In the previous setting process, it is necessary to manually list each ID and compare each bit carefully to find out the bit with the same bit, and then set the obtained data. To the response register, to implement the CAN protocol version, standard and extended data frames and 0-8 byte data length are required, and a programmable bit rate up to 1MB / s is required, and remote frames are supported. CAN has 5 FIFO storage mechanisms Receive buffers, three transmit buffers with internal prioritization using local priority concept, programmable wake-up function with integrated low-pass filter, programmable loopback mode for self-test operation, programmable listen mode for CAN Bus monitoring, the internal timer provides time stamps for received and sent messages, three low-power modes: sleep, shutdown, MSCAN enable and other module features, but the current CAN filter setting circuit is not simple enough, and the setting steps are complicated

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method for setting CAN filter of Freescale MCU

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0012] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0013] see figure 1 , the present invention provides a kind of technical scheme: a kind of CAN filter setting method about Freescale single-chip microcomputer, comprising OR operation 1, extracting 0bit position 2, ID inversion 3, extracting 1bit position 4 and setting register 5, it is characterized in that : This circuit includes three steps in total. The first step includes OR operation 1 and extracting 0bit 2. The specific steps are to perform OR operation...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a CAN filter setting method about a Freescale semiconductor. The method comprises OR operation and three steps of step 1, carrying out OR operation and extracting a 0bit: firstly, carrying out OR operation on to-be-compared bits, extracting all bits corresponding to 0, and setting the bits into 1 through the variable i; step 2, carrying out ID negation and extracting 1bits: carrying out negation OR operation on each ID, extracting all bits corresponding to 1 and setting the bits into 1; and step 3, setting registers: obtaining all data corresponding to bits in the same bits and setting corresponding registers through m. According to the invention, ID negation is set, so the setting speed is fast, programming efficiency is greatly improved, manual operation errors are reduced, the structure is simple and clear, operation is simple, setting steps are few; and following upgrading and maintenance of the software are facilitated.

Description

technical field [0001] The invention relates to the technical field of computer programming, in particular to a CAN filter setting method of a Freescale single-chip microcomputer. Background technique [0002] The CAN module of the Freescale MCU needs to compare each bit carefully in setting the filter. For example, the single-chip microcomputer needs to accept CAN standard frames whose IDs are 0x21, 0x57, and 0x43. In the previous setting process, it is necessary to manually list each ID and compare each bit carefully to find out the bit with the same bit, and then set the obtained data. To the response register, to implement the CAN protocol version, standard and extended data frames and 0-8 byte data length are required, and a programmable bit rate up to 1MB / s is required, and remote frames are supported. CAN has 5 FIFO storage mechanisms Receive buffers, three transmit buffers with internal prioritization using local priority concept, programmable wake-up function with ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G05B23/02
CPCG05B23/0213G05B2219/24065
Inventor 李士涛吴得宗崔忠瑞
Owner 山东汉格威新能源汽车电控制造有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products