Hardware Reference
In-Depth Information
Step 4
Subtracting 7 for prop_seg and 1 for sync_seg from 16 time quanta per bit gives 8.
Since the result is greater than 4 and is even, divide it by 2 (quotient is 4) and assign it to
phase_seg1 and phase_seg2.
Step 5
RJW (5 4) is the smaller of 4 and phase_seg1.
Step 6
From Equation 13.6,
Δ f , RJW 4 (20 3 NBT) 5 4 4 (20 3 16) 5 1.25 percent
From Equation 13.7,
Δ f , MIN (phase_seg1, phase_seg2) 4 2(13 3 NBT 2 phase_seg2) 5 4 4 408 5 0.98 percent.
The required oscillator tolerance is the smaller of these values, 0.98 percent.
Since phase_seg2 5 4, there is no need to try other prescale values.
In summary,
Prescaler 5 2
Nominal bit time 5 16
prop_seg 5 7
sync_seg 5 1
phase_seg1 5 4
phase_seg2 5 4
RJW 5 4
Oscillator tolerance 5 0.98 percent
13.12 MSCAN Configuration
The timing parameters for the MSCAN module need be set only once and should be done
immediately after MCU reset. Other parameters such as acceptance filters may be changed
after reset configuration.
Example 13.3
Write a program to configure the MSCAN module 1 after reset to operate with the timing
parameters computed in Example 13.1 and the following setting:
Enable wake-up
Disable time stamping
Select oscillator as the clock source to the MSCAN
Disable loopback mode, disable listen-only mode
One sample per bit
Accept messages with extended identifiers that start with T1 and P1 (use two 32-bit
filters)
 
Search WWH ::




Custom Search