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

vanryssel-s fix for canfd data transmission #1

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/mcp2517fd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,8 @@ bool MCP2517FD::_initFD(uint32_t nominalSpeed, uint32_t dataSpeed, uint8_t freq,
txDelayConfig.bF.TDCMode = 2; //automatic mode. The module will figure out the proper delay itself
txDelayConfig.bF.TDCValue = 0; //this value set by hardware in auto mode
txDelayConfig.bF.TDCOffset = (dataCfg.bF.BRP + 1) * (tseg1); //set value (dbrp * dtseg1) as a basepoint

nominalCfg.bF.SJW = tseg2 - 1;
dataCfg.bF.SJW = tseg2 - 1;
if (debuggingMode) Serial.printf("Data Settings: TSEG1: %u TSEG2: %u\n", tseg1, tseg2);

canConfig.bF.IsoCrcEnable = 1; //It's likely we need ISO CRC mode active to get FD to work properly
Expand Down