EasyManua.ls Logo

NXP Semiconductors MPC5606S - Enabling;Disabling the CAN Sampler

NXP Semiconductors MPC5606S
1344 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CAN Sampler
MPC5606S Microcontroller Reference Manual, Rev. 7
Freescale Semiconductor 185
nominal bit) of the second frame, including the SOF bit. These samples are stored in consecutive addresses
of the (12 × 32) internal registers. RX_COMPLETE bit is set to 1, indicating that sampling is complete.
Software should now process the sampled data by first becoming master for accessing samples internal
registers by resetting the CAN_SMPLR_EN bit. The sampler will need to be enabled again to start waiting
for a new sampling routine.
7.4.1 Enabling/disabling the CAN Sampler
The CAN Sampler is disabled on reset and the CPU is able to access the 12 registers used for storing
samples. The CAN Sampler must be enabled before entering Standby or Stop mode by setting
CR[CAN_SMPLR_EN].
When the CAN Sampler is enabled, the A, D, WEN, CSN, and CK to the (12 × 32) block of registers are
switched to those generated by the kernel of the sampler. You can monitor CR[Active_CK] to check which
is the active clock to the registers.
If there is any activity on the selected Rx line, the sampler enables the 16 MHz RC oscillator. When
CAN_SMPLR_EN is reset to 0, the sampler should receive at least three RC clock pulses to reset itself,
after which the RC can be switched off.
When the software wishes to access the contents of the sample registers, it must first reset the
CAN_SMPLR_EN bit by writing a 0. Before accessing the register contents it must monitor Active_CK
bit for 0. When this bit is reset, it can safely access the (12 × 32) sample registers. While shifting between
Normal to Sample mode, the sample register signals must be static and inactive to ensure the data is not
corrupted.
7.4.2 Selecting the Rx port
One Rx port can be selected per sampling routine; the port to be sampled is selected by CAN_RX_SEL.
Table 7-3. Internal multiplexer correspondence
CAN_RX_SEL Rx selected
000 CANRX_0 PB[1]
001 CANRX_1 PB[10]
010 CANRX_2 PF[13]
011 CANRX_3 PJ[4]
100 CANRX_4 PJ[6]
101 Reserved
110 Reserved
111 Reserved

Table of Contents

Related product manuals