Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: STM32_F103-C8T6basecanblink_led
Fork of mbed-dev by
Diff: targets/TARGET_STM/can_api.c
- Revision:
- 182:57724642e740
- Parent:
- 181:96ed750bd169
--- a/targets/TARGET_STM/can_api.c Wed Jan 17 15:23:54 2018 +0000
+++ b/targets/TARGET_STM/can_api.c Fri Feb 16 16:09:33 2018 +0000
@@ -468,11 +468,11 @@
sFilterConfig.FilterIdLow = 0x0;
sFilterConfig.FilterMaskIdHigh = mask << 5;
sFilterConfig.FilterMaskIdLow = 0x0; // allows both remote and data frames
- } else if (format == CANExtended) {
+ } else { // format == CANExtended
sFilterConfig.FilterIdHigh = id >> 13; // EXTID[28:13]
- sFilterConfig.FilterIdLow = (0x00FF & (id << 3)) | (1 << 2); // EXTID[12:0]
+ sFilterConfig.FilterIdLow = (0xFFFF & (id << 3)) | (1 << 2); // EXTID[12:0] + IDE
sFilterConfig.FilterMaskIdHigh = mask >> 13;
- sFilterConfig.FilterMaskIdLow = (0x00FF & (mask << 3)) | (1 << 2);
+ sFilterConfig.FilterMaskIdLow = (0xFFFF & (mask << 3)) | (1 << 2);
}
sFilterConfig.FilterFIFOAssignment = 0;
