Programming Examples
9-88
ADSP-BF537 Blackfin Processor Hardware Reference
R0 = 0x0334(Z);
/* SJW = 3, TSEG2 = 3, TSEG1 = 4 */
W[P0] = R0;
SSYNC;
/* ===================================================
** CAN_CLOCK - Calculate Prescaler (BRP)
**
** Assume a 500kbps CAN rate is desired, which means
** the duration of the bit on the CAN bus (tBIT) is
** 2us. Using the tBIT formula from the HRM, solve for
** TQ:
**
** tBIT = TQ x (1 + (TSEG1 + 1) + (TSEG2 + 1))
** 2us = TQ x (1 + (4 + 1) + (3 + 1))
** 2e-6 = TQ x (1 + 5 + 4)
** TQ = 2e-6 / 10
** TQ = 2e-7
**
** Once time quantum (TQ) is known, BRP can be derived
** from the TQ formula in the HRM. Assume the default
** PLL settings are used for the ADSP-BF537 EZ-KIT,
** which implies that System Clock (SCLK) is 50MHz:
**
** TQ = (BRP+1) / SCLK
** 2e-7 = (BRP+1) / 50e6
** (BRP+1) = 10
** BRP = 9
*/
P0.L = LO(CAN_CLOCK);
R0 = 9(Z);
W[P0] = R0;
SSYNC;
RTS;
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...