sCAN baud rate settings
The sCAN API exposes baud rate settings through nrf_scan_timing_t, which is passed to nrf_scan_timing().
These parameters are translated into a value for FLPR’s internal counters.
Timing calculation
The parameter calculation follows CAN Specification 2.0 A/B and the CiA99 paper.
When the SoC runs at its highest base clock frequency, the FLPR frequency is as follows:
A time quantum is the base unit for the configuration parameters.
The timing segments make up each transmitted bit. The total number of time quanta in each transmitted bit is calculated as follows:
Timing constraints
The timing parameters must meet the following constraints:
prescalermust be at least8.prop_segandphase_seg1must each be between1and8.phase_seg2must be between1andphase_seg1.The sum of
prop_seg,phase_seg1, andphase_seg2must be at least7.sjwmust be between1and the lower ofphase_seg1and4.
Example configuration
The following example configures a baud rate of 1 Mbps:
nrf_scan_timing_t m_scan_timing = {
.prescaler = 8,
.prop_seg = 1,
.phase_seg1 = 7,
.phase_seg2 = 7,
.sjw = 1
};