#include "stdio.h"
Fr_TMS570LS_ClusterConfigType Fr_cluster_config = {
- .gColdStartAttempts = 4,
+ .gColdStartAttempts = 0x2,
.gListenNoise = 0xF,
.gMacroPerCycle = 0x15E0, // (cycle period, 5.6us)
.gMaxWithoutClockCorrectionFatal = 0xF,
.gPayloadLengthStatic = 0x9,
.gSyncNodeMax = 0xF,
.gdActionPointOffset = 0x4,
- .gdCASRxLowMax = 80,
+ .gdCASRxLowMax = 0x43,
.gdDynamicSlotIdlePhase = 0x1,
.gdMinislot = 0x4,
.gdMinislotActionPointOffset = 0x2,
.gdNIT = 0xAE3,
- .gdSampleClockPeriod = 0,
+ .gdSampleClockPeriod = 0, // 10mbit/sec
.gdStaticSlot = 0x56,
.gdTSSTransmitter = 0xA,
.gdWakeupSymbolRxIdle = 18,
Fr_TMS570LS_NodeConfigType Fr_node_A_config = {
.pAllowHaltDueToClock = 0,
- .pAllowPassiveToActive = TRUE,
+ .pAllowPassiveToActive = FALSE,
.pChannels = FR_CHANNEL_AB,
.pClusterDriftDamping = 0x1,
.pDelayCompensationA = 0x3,
.pMicroInitialOffsetA = 0x18,
.pMicroInitialOffsetB = 0x18,
.pMicroPerCycle = 0x36B00,
- .pRateCorrectionOut = 0x151,
- .pSamplesPerMicrotick = 2,
- .pSingleSlotEnabled = FALSE,
+ .pRateCorrectionOut = 0xCD,
+ .pOffsetCorrectionOut = 0x151,
+ .pSamplesPerMicrotick = 0, // 10 mbit/sec
+ .pSingleSlotEnabled = TRUE,
.pWakeupChannel = FR_CHANNEL_A,
.pWakeupPattern = 2,
.pdAcceptedStartupRange = 0x81,
.pdListenTimeout = 0x36DA2,
- .pdMaxDrift = 0x151
+ .pdMaxDrift = 0x151,
+ .pDecodingCorrection = 0x33
};
Fr_TMS570LS_NodeConfigType Fr_node_B_config = {
- .pAllowHaltDueToClock = 0,
- .pAllowPassiveToActive = TRUE,
- .pChannels = FR_CHANNEL_AB,
- .pClusterDriftDamping = 0x1,
- .pDelayCompensationA = 0x3,
- .pDelayCompensationB = 0x3,
- .pExternOffsetCorrection = 0,
- .pExternRateCorrection = 0,
- .pKeySlotUsedForStartup = TRUE,
- .pKeySlotUsedForSync = TRUE,
- .pLatestTx = 0x10D,
- .pMacroInitialOffsetA = 0x6,
- .pMacroInitialOffsetB = 0x6,
- .pMicroInitialOffsetA = 0x18,
- .pMicroInitialOffsetB = 0x18,
- .pMicroPerCycle = 0x36B00,
- .pRateCorrectionOut = 0x151,
- .pSamplesPerMicrotick = 2,
- .pSingleSlotEnabled = FALSE,
- .pWakeupChannel = FR_CHANNEL_A,
- .pWakeupPattern = 2,
- .pdAcceptedStartupRange = 0x81,
- .pdListenTimeout = 0x36DA2,
- .pdMaxDrift = 0x151
+ .pAllowHaltDueToClock = 0,
+ .pAllowPassiveToActive = FALSE,
+ .pChannels = FR_CHANNEL_AB,
+ .pClusterDriftDamping = 0x1,
+ .pDelayCompensationA = 0x3,
+ .pDelayCompensationB = 0x3,
+ .pExternOffsetCorrection = 0,
+ .pExternRateCorrection = 0,
+ .pKeySlotUsedForStartup = TRUE,
+ .pKeySlotUsedForSync = TRUE,
+ .pLatestTx = 0x10D,
+ .pMacroInitialOffsetA = 0x6,
+ .pMacroInitialOffsetB = 0x6,
+ .pMicroInitialOffsetA = 0x18,
+ .pMicroInitialOffsetB = 0x18,
+ .pMicroPerCycle = 0x36B00,
+ .pRateCorrectionOut = 0xCD,
+ .pOffsetCorrectionOut = 0x151,
+ .pSamplesPerMicrotick = 0, // 10 mbit/sec
+ .pSingleSlotEnabled = TRUE,
+ .pWakeupChannel = FR_CHANNEL_A,
+ .pWakeupPattern = 2,
+ .pdAcceptedStartupRange = 0x81,
+ .pdListenTimeout = 0x36DA2,
+ .pdMaxDrift = 0x151,
+ .pDecodingCorrection = 0x33
};
Fr_TMS570LS_MsgRAMConfig Fr_node_A_msgRAM_config = {
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
.isTx = TRUE,
- .maxPayload = 127,
+ .maxPayload = 9,
.msgBufferInterrupt = TRUE,
.payloadPreambleIndicatorTr = FALSE,
.rejectNullFrames = FALSE,
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
.isTx = FALSE,
- .maxPayload = 127,
+ .maxPayload = 9,
.msgBufferInterrupt = TRUE,
.payloadPreambleIndicatorTr = FALSE,
.rejectNullFrames = FALSE,
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
.isTx = TRUE,
- .maxPayload = 127,
+ .maxPayload = 9,
.msgBufferInterrupt = TRUE,
.payloadPreambleIndicatorTr = FALSE,
.rejectNullFrames = FALSE,
.channel = FR_CHANNEL_AB,
.cycleCounterFiltering = 0,
.isTx = FALSE,
- .maxPayload = 127,
+ .maxPayload = 9,
.msgBufferInterrupt = TRUE,
.payloadPreambleIndicatorTr = FALSE,
.rejectNullFrames = FALSE,