
ADSP-BF50x Blackfin Processor Hardware Reference
17-85
CAN Module
Programming Examples
The following CAN code examples (
Listing 17-2
through
Listing 17-4
)
show how to program the CAN hardware and timing, initialize mailboxes,
perform transfers, and service interrupts. Each of these code examples
assumes that the appropriate header file is included in the source code
(that is,
#include <defBF537.h>
for ADSP-BF537 projects).
CAN Setup Code
The following code initializes the port pins to connect to the CAN con-
troller and configures the CAN timing parameters.
Listing 17-2. Initializing CAN
Initialize_CAN:
P0.H = HI(PORT_MUX);
/* CAN pins muxed on Port J */
P0.L = LO(PORT_MUX);
R0 = PJCE_CAN(Z);
/* Enable CAN TX/RX pins */
W[P0] = R0;
SSYNC;
/* ===================================================
** Set CAN Bit Timing
**
** CAN_TIMING - SJW, TSEG2, and TSEG1 governed by:
** SJW <= TSEG2 <= TSEG1
**
** ===================================================
*/
P0.H = HI(CAN_TIMING);
P0.L = LO(CAN_TIMING);
Содержание EZ-KIT Lite ADSP-BF506F
Страница 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 132: ...Unique Information for the ADSP BF50x Processor 4 22 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 342: ...Unique Information for the ADSP BF50x Processor 7 106 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 484: ...Unique Information for the ADSP BF50x Processor 10 60 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 493: ...ADSP BF50x Blackfin Processor Hardware Reference 11 9 Core Timer Unique Information for the ADSP BF50x Processor None ...
Страница 494: ...Unique Information for the ADSP BF50x Processor 11 10 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 506: ...Unique Information for the ADSP BF50x Processor 12 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 544: ...Unique Information for the ADSP BF50x Processor 13 38 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 712: ...Unique Information for the ADSP BF50x Processor 16 62 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 972: ...Unique Information for the ADSP BF50x Processor 20 38 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...