Programming Examples; Can Setup Code - Analog Devices ADSP-BF506F Hardware Reference Manual

Adsp-bf50x blackfin processor
Hide thumbs Also See for ADSP-BF506F:
Table of Contents

Advertisement

Programming Examples

The following CAN code examples
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>

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);
P0.L = LO(PORT_MUX);
R0 = PJCE_CAN(Z);
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);
ADSP-BF50x Blackfin Processor Hardware Reference
(Listing 17-2
for ADSP-BF537 projects).
/* CAN pins muxed on Port J */
/* Enable CAN TX/RX pins */
CAN Module
through
Listing
17-4)
17-85

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADSP-BF506F and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Adsp-bf504Adsp-bf504f

Table of Contents