Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FDCAN to 4MBIT #1397

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

FDCAN to 4MBIT #1397

wants to merge 24 commits into from

Conversation

Lucien950
Copy link
Contributor

Changelist

Testing Done

Resolved Tickets

@Lucien950 Lucien950 self-assigned this Nov 26, 2024
@Lucien950 Lucien950 added the Systems Shared App Level Modules label Nov 26, 2024
@@ -47,7 +47,7 @@ bool hw_can_transmit(const CanMsg *msg)
tx_header.DataLength = msg->dlc << 16; // Data length code needs to be shifted by 16 bits.
tx_header.ErrorStateIndicator = FDCAN_ESI_ACTIVE;
tx_header.BitRateSwitch = FDCAN_BRS_OFF;
tx_header.FDFormat = FDCAN_CLASSIC_CAN;
tx_header.FDFormat = FDCAN_FD_CAN;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

little suspect on this one

static uint64_t i = 0;
uint8_t i8[8];
*reinterpret_cast<uint64_t *>(&i8) = i;
const CanMsg msg = { .std_id = 0, .dlc = 8, .data = { i8[7], i8[6], i8[5], i8[4], i8[3], i8[2], i8[1], i8[0] } };
Copy link
Contributor Author

@Lucien950 Lucien950 Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

be careful about fdcan DLC non-linearities

@Lucien950 Lucien950 changed the title Crank CAN Speed FDCAN to 4MBIT Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Systems Shared App Level Modules
Development

Successfully merging this pull request may close these issues.

2 participants