Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8987793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:52:34+00:00 2026-06-15T21:52:34+00:00

I am using the STM32F4Discovery kit to build a simple CAN interface. I managed

  • 0

I am using the STM32F4Discovery kit to build a simple CAN interface. I managed to configure it so I can transmit CAN messages, however, I am stuck at receiving them. As far so I know, to receive a CAN message, it has to pass acceptance filters. I would like to set the filter to accept all (standard, 2.0A) messages from ID 0x700 to 0x7FF. How do I do this?

I’ve read the reference manual, but I have no idea how to actually configure the filtering.

void CAN_FilterConfiguration(void) {
    CAN_FilterInitTypeDef CAN_FilterInitStructure;

    /* CAN2 filter configuration */
    CAN_FilterInitStructure.CAN_FilterNumber = 1; // filter number = 1 (0<=x<=13)
    CAN_FilterInitStructure.CAN_FilterMode = CAN_FilterMode_IdMask;
    CAN_FilterInitStructure.CAN_FilterScale = CAN_FilterScale_16bit;
    CAN_FilterInitStructure.CAN_FilterIdHigh = 0x0000;
    CAN_FilterInitStructure.CAN_FilterIdLow = 0x0000;
    CAN_FilterInitStructure.CAN_FilterMaskIdHigh = 0x0000;
    CAN_FilterInitStructure.CAN_FilterMaskIdLow = 0x0000;
    CAN_FilterInitStructure.CAN_FilterFIFOAssignment = CAN_FIFO0; // FIFO = 0
    CAN_FilterInitStructure.CAN_FilterActivation = ENABLE;
    CAN_FilterInit(&CAN_FilterInitStructure);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:52:35+00:00Added an answer on June 15, 2026 at 9:52 pm

    Filters are working in List or Mask mode. They can be 32 bit or 16 bit. You can have 32 filters, but 0-13 are assigned to CAN1 and 14+ are for CAN2.

    In one filter there is one 32-bit filter or two 16-bit filters

    • One 32-bit filter for the STDID[10:0], EXTID[17:0], IDE and RTR bits.
    • Two 16-bit filters for the STDID[10:0], RTR, IDE and EXTID[17:15] bits.

    This is the way to make a tested word. In mask mode the CAN accepts when TESTED & MASK == ID. In list mode CAN accepts when TESTED == ID or MASK == ID. There are two filters in 16 bit and one filter in 32 bit – when ID = IDHigh << 16 | IDLow (and same way to join mask).

    More information on DM0090 link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using GDB and OpenOCD to debug a simple program on my STM32F4DISCOVERY board
Using Play 2.1-RC1 I can't write simple test. Here's the action code: def echoTestTagFromXml
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Using System.Diagnostics.EventLog .NET type one can programmatically create logs into the Event Viewer application.
Using range() in Underscore I can make something like this: _.range(10); >> [0, 1,
Using PL/SQL, how can I remove sentences, except the first occurrence of a sentence
Using NLTK and WordNet , how do I convert simple tense verb into its
Using Tsql, how can I find out when MS SQL server was installed?
Using the RichTextArea in GWT, It looks like I can only change the font

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.