Properly specify the FlexRay CC registers

pull/25/head
Paul Hollinsky 2019-11-20 16:24:20 +01:00
parent 52b0b4c586
commit 724cc428d9
1 changed files with 4 additions and 4 deletions

View File

@ -86,7 +86,7 @@ bool FlexRay::Controller::configure(std::chrono::milliseconds timeout) {
registerWrites.push_back({ ERAYRegister::SUCC2, registerWrites.push_back({ ERAYRegister::SUCC2,
((controllerConfig.ListenTimeout & 0x1fffff)) | ((controllerConfig.ListenTimeout & 0x1fffff)) |
(clusterConfig.ListenNoiseMacroticks << 24) ((clusterConfig.ListenNoiseMacroticks - 1) << 24)
}); });
registerWrites.push_back({ ERAYRegister::SUCC3, registerWrites.push_back({ ERAYRegister::SUCC3,
@ -103,7 +103,7 @@ bool FlexRay::Controller::configure(std::chrono::milliseconds timeout) {
((clusterConfig.CASRxLowMax & 0x3F) << 4) | ((clusterConfig.CASRxLowMax & 0x3F) << 4) |
((clusterConfig.StrobePointPosition & 0x3) << 12) | ((clusterConfig.StrobePointPosition & 0x3) << 12) |
((clusterConfig.Speed & 0x3) << 14) | ((clusterConfig.Speed & 0x3) << 14) |
((clusterConfig.WakeupRxWindowBits & 0x1F) << 16) | ((clusterConfig.WakeupRxWindowBits & 0x1ff) << 16) |
((controllerConfig.WakeupPattern) << 26) ((controllerConfig.WakeupPattern) << 26)
}); });
@ -153,8 +153,8 @@ bool FlexRay::Controller::configure(std::chrono::milliseconds timeout) {
}); });
registerWrites.push_back({ ERAYRegister::GTUC7, registerWrites.push_back({ ERAYRegister::GTUC7,
clusterConfig.NumberOfStaticSlots | (clusterConfig.StaticSlotMacroticks) |
(clusterConfig.StaticSlotMacroticks << 16) (clusterConfig.NumberOfStaticSlots << 16)
}); });
registerWrites.push_back({ ERAYRegister::GTUC8, registerWrites.push_back({ ERAYRegister::GTUC8,