Universal Programmable Converter for CAN FD and CAN
-
cgmollo62
- Posts: 10
- Joined: Tue 28. Jun 2022, 13:06
Post
by cgmollo62 » Tue 28. Jun 2022, 18:06
Regarding the second argument to the CAN_FilterAdd function, does:
Code: Select all
CAN_FilterAdd (CAN_BUS1, CAN_MSGTYPE_FDF | CAN_MSGTYPE_EXTENDED, 0x000, 0x7FF);
mean the message has to be a CAN FD message
and have an extended ID, or does it mean the message has to be a CAN FD message
or have an extended ID?
I am guessing the former but would like to confirm. Thanks!
Chris
Last edited by
K.Wagner on Wed 29. Jun 2022, 07:43, edited 1 time in total.
Reason: Code formatting for better reading
-
PEAK-Support
- Sales & Support

- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Post
by PEAK-Support » Wed 29. Jun 2022, 09:54
The "extended" parameter is not yet implemented - so it does not care which value you use in the function.
See can.h
not used yet, 29 bit IDs received always
Code: Select all
//! @brief
//! This function adds CAN-IDs to the filter.
//!
//! @param hBus handle for CAN bus, see CAN_BUS...
//! @param extended not used yet, 29 bit IDs received always
//! @param FromID start ID (including)
//! @param ToID end ID (including)
//!
//! @return CANResult_t one result of CAN_ERR_...
CANResult_t CAN_FilterAdd ( CANHandle_t hBus, uint8_t extended, uint32_t FromID, uint32_t ToID);
That means only 11Bit ID´s could be filtered, all others will be always received.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
cgmollo62
- Posts: 10
- Joined: Tue 28. Jun 2022, 13:06
Post
by cgmollo62 » Wed 29. Jun 2022, 15:16
Great. Thanks! The code I downloaded last February does not have those param descriptions in the comments for the CAN_FilterAdd function. I will download the code again to get the latest and greatest.