16.7.1.4 EALLOW Protection
To protect against inadvertent modification, some critical registers/bits of the eCAN module are EALLOW
protected. These registers and bits can be changed only if the EALLOW protection has been disabled. Following
are the registers and bits that are EALLOW protected in the eCAN module:
• CANMC[15:9, 7:6]
• CANBTC
• CANGIM
• CANMIM[31..0]
• CANTSC[31..0]
• CANTIOC[3]
• CANRIOC[3]
16.7.2 Steps to Configure eCAN
Note
This sequence must be done with EALLOW enabled.
The following steps must be performed to configure the eCAN for operation:
1. Enable clock to the CAN module.
2. Set the CANTX and the CANRX pins to CAN functions:
a. Write CANTIOC.3:0 = 0x08
b. Write CANRIOC.3:0 = 0x08
3. After a reset, bit CCR (CANMC.12) and bit CCE (CANES.4) are set to 1. This allows the user to configure
the bit-timing configuration register (CANBTC). If the CCE bit is set (CANES.4 = 1), proceed to next step;
otherwise, set the CCR bit (CANMC.12 = 1) and wait until CCE bit is set (CANES.4 = 1).
4. Program the CANBTC register with the appropriate timing values. Make sure that the values TSEG1 and
TSEG2 are not 0. If they are 0, the module does not leave the initialization mode.
5. For the SCC, program the acceptance masks now. For example:
Write LAM(3) = 0x3C0000
6. Program the master control register (CANMC) as follows:
a. Clear CCR (CANMC.12) = 0
b. Clear PDR (CANMC.11) = 0
c. Clear DBO (CANMC.10) = 0
d. Clear WUBA (CANMC.9)= 0
e. Clear CDR (CANMC.8) = 0
f.
Clear ABO (CANMC.7) = 0
g. Clear STM (CANMC.6) = 0
h. Clear SRES (CANMC.5) = 0
i.
Clear MBNR (CANMC.4-0) = 0
7. Initialize all bits of MSGCTRLn registers to zero.
8. Verify the CCE bit is cleared (CANES.4 = 0), indicating that the CAN module has been configured.
This completes the setup for the basic functionality.
Controller Area Network (CAN)
1014
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......