CP3BT26G18NEP/HAPB National Semiconductor, CP3BT26G18NEP/HAPB Datasheet

no-image

CP3BT26G18NEP/HAPB

Manufacturer Part Number
CP3BT26G18NEP/HAPB
Description
Manufacturer
National Semiconductor
Datasheet

Specifications of CP3BT26G18NEP/HAPB

Operating Temperature (min)
-40C
Operating Temperature (max)
85C
Operating Temperature Classification
Industrial
Mounting
Surface Mount
Pin Count
128
Package Type
LQFP
Lead Free Status / RoHS Status
Not Compliant
©2007 National Semiconductor Corporation
CP3BT26 Reprogrammable Connectivity Processor with
Bluetooth
1.0
The CP3BT26 connectivity processor combines high perfor-
mance with the massive integration needed for embedded
Bluetooth applications. A powerful RISC core with on-chip
SRAM and Flash memory provides high computing band-
width, hardware communications peripherals provide high-
I/O bandwidth, and an external bus provides system ex-
pandability.
On-chip communications peripherals include: Bluetooth
Lower Link Controller, Universal Serial Bus (USB) 1.1 node,
CAN, Microwire/Plus, SPI, ACCESS.bus, quad UART, 12-bit
A/D converter, and Advanced Audio Interface (AAI). Addi-
tional on-chip peripherals include Random Number Gener-
ator (RNG), DMA controller, CVSD/PCM conversion
module, Timing and Watchdog Unit, Versatile Timer Unit,
Multi-Function Timer, and Multi-Input Wake-Up (MIWU)
unit.
Bluetooth hand-held devices can be both smaller and lower
in cost for maximum consumer appeal. The low voltage and
Block Diagram
Bluetooth is a registered trademark of Bluetooth SIG, Inc. and is used under license by National Semiconductor.
TRI-STATE is a registered trademark of National Semiconductor Corporation.
CPU Core
Interface
12 MHz and 32 kHz
CR16C
Bus
Unit
GPIO
Oscillator
General Description
256K Bytes
Controller
Program
Memory
Interface
Flash
DMA
Audio
Clock Generator
PLL and Clock
®
Generator
, USB, and CAN Interfaces
Microwiire/
8K Bytes
Peripheral
SPI
Controller
Flash
Data
Bus
Power-on-Reset
Quad UART
32K Bytes
Static
Interrupt
RAM
Control
Unit
Peripheral Bus
CPU Core Bus
ACCESS
.bus
CAN 2.0B
Controller
CVSD/PCM
Converter
Timer Unit
advanced power-saving modes achieve new design points
in the trade-off between battery size and operating time for
handheld and portable applications.
In addition to providing the features needed for the next gen-
eration of embedded Bluetooth products, the CP3BT26 is
backed up by the software resources designers need for
rapid time-to-market, including an operating system, Blue-
tooth protocol stack implementation, peripheral drivers, ref-
erence
environment. Combined with a Bluetooth radio transceiver
such as National’s LMX5252, the CP3BT26 provides a com-
plete Bluetooth system solution.
National Semiconductor offers a complete and industry-
proven application development environment for CP3BT26
applications, including the IAR Embedded Workbench,
iSYSTEM winIDEA and iC3000 Active Emulator, Bluetooth
Development Board, Bluetooth Protocol Stack, and Applica-
tion Software.
Versatile
RF Interface
Manage-
Protocol
designs,
Power
ment
Muti-Func-
Core
tion Timer
Bluetooth Lower
Link Controller
Sequencer RAM
4.5K Bytes
Data RAM
and
1K Byte
Multi-Input
Timing and
Wake-Up
Watchdog
Unit
an
12-bit ADC
8-Channel
integrated
Generator
Random
Interface
Number
Debug
Serial
FEBRUARY 2007
www.national.com
USB
development
DS202

Related parts for CP3BT26G18NEP/HAPB

CP3BT26G18NEP/HAPB Summary of contents

Page 1

... Microwiire/ GPIO Interface SPI Bluetooth is a registered trademark of Bluetooth SIG, Inc. and is used under license by National Semiconductor. TRI-STATE is a registered trademark of National Semiconductor Corporation. ©2007 National Semiconductor Corporation advanced power-saving modes achieve new design points in the trade-off between battery size and operating time for handheld and portable applications ...

Page 2

General Description . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2.0 Features . . . . . . . . ...

Page 3

Features CPU Features ! Fully static RISC processor core, capable of operating from MHz with zero wait/hold states ! Minimum 41.7 ns instruction cycle time with a 24-MHz in- ternal clock frequency, based on a 12-MHz ...

Page 4

Device Overview The CP3BT26 connectivity processor is a complete micro- computer with all system timing, interrupt logic, program memory, data memory, and I/O ports included on-chip, mak- ing it well-suited to a wide range of embedded applications. The block ...

Page 5

BLUETOOTH LLC The integrated hardware Bluetooth Lower Link Controller (LLC) complies to the Bluetooth Specification Version 1.1 and integrates the following functions: ! 4.5K-byte dedicated Bluetooth Data RAM ! 1K-byte dedicated Bluetooth Sequencer RAM ! Support of all Bluetooth ...

Page 6

RANDOM NUMBER GENERATOR RNG peripheral for use in Trusted Computer Peripheral Ap- plications (TCPA) to improve the authenticity, integrity, and privacy of Internet-based communication and commerce. 3.15 MICROWIRE/SPI The Microwire/SPI (MWSPI) interface module supports syn- chronous serial communications with ...

Page 7

... IAR Embedded Workbench, iSYSTEM winIDEA and iC3000 Active Emulator, Bluetooth Development Board, Bluetooth Protocol Stack, and Applica- tion Software. See your National Semiconductor sales rep- resentative for current information on availability and features of emulation equipment and evaluation boards. Transaction ...

Page 8

Signal Descriptions X1CKI/BBCLK 12 MHz Crystal or Ext. Clock X1CKO X2CKI 32.768 kHz Crystal X2CKO AVCC 1 AGND 1 ADVCC 1 Power ADGND CP3BT26 1 Supply VCC (LQFP-128) 6 GND 6 IOVCC 15 PGO/RFSYNC IOGND 14 Chip Reset RESET ...

Page 9

Table 2 CP3BT26 LQFP-128 Signal Descriptions Name Pins I/O Primary Function Input 12 MHz Oscillator Input X1CKI 1 Output 12 MHz Oscillator Output X1CKO 1 Input 32 kHz Oscillator Input X2CKI 1 Output 32 kHz Oscillator Output X2CKO 1 Input ...

Page 10

Name Pins I/O 1 I/O ADC Input Channel 3 ADC3 1 I/O ADC Input Channel 4 ADC4 1 I/O ADC Input Channel 5 ADC5 1 Input ADC Input Channel 6 ADC6 1 Input ADC Input Channel 7 ADC7 1 Input ...

Page 11

Name Pins I/O Primary Function 1 I/O Generic I/O PG4 1 I/O Generic I/O PG5 1 I/O Generic I/O PG6 1 I/O Generic I/O PG7 1 I/O Generic I/O PH0 1 I/O Generic I/O PH1 1 I/O Generic I/O PH2 ...

Page 12

Table 3 CP3BT26 LQFP-144 Signal Descriptions Name Pins I/O Input 12 MHz Oscillator Input X1CKI 1 Output 12 MHz Oscillator Output X1CKO 1 Input 32 kHz Oscillator Input X2CKI 1 Output 32 kHz Oscillator Output X2CKO 1 Input Chip general ...

Page 13

Name Pins I/O Primary Function 1 I/O ADC Input Channel 3 ADC3 1 I/O ADC Input Channel 4 ADC4 1 I/O ADC Input Channel 5 ADC5 1 Input ADC Input Channel 6 ADC6 1 Input ADC Input Channel 7 ADC7 ...

Page 14

Name Pins I/O 1 I/O Generic I/O PF6 1 I/O Generic I/O PF7 1 I/O Generic I/O PG0 1 I/O Generic I/O PG1 1 I/O Generic I/O PG2 1 I/O Generic I/O PG3 1 I/O Generic I/O PG4 1 I/O ...

Page 15

CPU Architecture The CP3BT26 uses the CR16C third-generation 16-bit CompactRISC processor core. The CPU implements a Re- duced Instruction Set Computer (RISC) architecture that al- lows an effective execution rate one instruction per clock cycle. For ...

Page 16

Interrupt Base Register (INTBASE) The INTBASE register holds the address of the dispatch ta- ble for exceptions. The dispatch table can be located any- where in the CPU address space. When loading the INTBASE register, bits ...

Page 17

CONFIGURATION REGISTER (CFG) The CFG register is used to enable or disable various oper- ating modes and to control optional on-chip caches. Be- cause the CP3BT26 does not have cache memory, the cache control bits in the CFG register ...

Page 18

ADDRESSING MODES The CR16C CPU core implements a load/store architec- ture, in which arithmetic and logical instructions operate on register operands. Memory operands are made accessible in registers using load and store instructions. For efficient implementation of I/O-intensive embedded ...

Page 19

STACKS A stack is a last-in, first-out data structure for dynamic stor- age of data and addresses. A stack consists of a block of memory used to hold the data and a pointer to the top of the stack. ...

Page 20

Mnemonic MOVi Rsrc/imm, Rdest MOVXB Rsrc, Rdest MOVZB Rsrc, Rdest MOVXW Rsrc, RPdest MOVZW Rsrc, RPdest MOVD imm, RPdest RPsrc, RPdest ADD[U]i Rsrc/imm, Rdest ADDCi Rsrc/imm, Rdest ADDD RPsrc/imm, RPdest MACQWa Rsrc1, Rsrc2, RPdest MACSWa Rsrc1, Rsrc2, RPdest MACUWa Rsrc1, ...

Page 21

Mnemonic Operands ASHUD Rsrc/imm, RPdest LSHi Rsrc/imm, Rdest LSHD Rsrc/imm, RPdest SBITi Iposition, disp(Rbase) Iposition, disp(RPbase) Iposition, (Rindex)disp(RPbasex) Iposition, abs Iposition, (Rindex)abs CBITi Iposition, disp(Rbase) Iposition, disp(RPbase) Iposition, (Rindex)disp(RPbasex) Iposition, abs Iposition, (Rindex)abs TBIT Rposition/imm, Rsrc TBITi Iposition, disp(Rbase) Iposition, ...

Page 22

Mnemonic RETX PUSH imm, Rsrc, RA POP imm, Rdest, RA POPRET imm, Rdest, RA LOADi disp(Rbase), Rdest abs, Rdest (Rindex)abs, Rdest (Rindex)disp(RPbasex), Rdest disp(RPbase), Rdest LOADD disp(Rbase), Rdest abs, Rdest (Rindex)abs, Rdest (Rindex)disp(RPbasex), Rdest disp(RPbase), Rdest STORi Rsrc, disp(Rbase) Rsrc, ...

Page 23

Mnemonic Operands STORMP imm3 DI EI EIWAIT NOP WAIT Table 5 Instruction Set Summary Store registers (R2-R5, R8-R11) to memory starting at (R7,R6) Disable maskable interrupts Enable maskable interrupts Enable maskable interrupts and wait for interrupt No ...

Page 24

Memory The CP3BT26 supports a uniform 16M-byte linear address space. Table 6 lists the types of memory and peripherals that occupy this memory space. Unlisted address ranges Start End Address Address 00 0000h 03 FFFFh 04 0000h 0C FFFFh ...

Page 25

Table 7 Operating Environment Selection ENV[2:0] EMPTY Operating Environment 111 No Internal ROM enabled (IRE) mode 011 No External ROM enabled (ERE) mode 000 N/A Development (DEV) mode Development (DEVINT) mode with 001 N/A internal memory 110 N/A In-System-Programming (ISP) ...

Page 26

I/O Zone Configuration Register (IOCFG) The IOCFG register is a word-wide, read/write register that controls the timing and bus characteristics of accesses to the 256-byte I/O Zone memory space (FF FB00h to FF FBFFh). The registers associated with Port ...

Page 27

IPRE The Preliminary Idle bit controls whether an idle cycle is inserted prior to the current bus cycle, when the new bus cycle accesses a dif- ferent zone. No idle cycles are required for on- chip accesses. – ...

Page 28

FRE The Fast Read Enable bit controls whether fast read bus cycles are used. A fast read op- eration takes one clock cycle. A normal read operation takes at least two clock cycles. – 0 Normal read cycles. – 1 ...

Page 29

System Configuration Registers The system configuration registers control and provide sta- tus for certain aspects of device setup and operation, such as indicating the states sampled from the ENV[2:0] inputs. The system configuration registers are listed in Table 9. ...

Page 30

MODULE STATUS REGISTER (MSTAT) The MSTAT register is a byte-wide, read-only register that indicates the general status of the device. The MCFG regis- ter format is shown below ISPRST WDRST Res. DPGMBUSY PGMBUSY OENV2:0 OENV2:0 ...

Page 31

Flash Memory The flash memory consists of the flash program memory and the flash data memory. The flash program memory is further divided into the Boot Area and the Code Area. A special protection scheme is applied to the ...

Page 32

Main Block 0 and 1 Main Block 0 and Main Block 1 hold the 256K-byte program space, which consists of the Boot Area and Code Area. Each block consists of sixteen 8K-byte sections. Write ac- cess by the CPU ...

Page 33

Main Block Page Erase A flash erase operation sets all of the bits in the erased re- gion. Pages of a main block can be individually erased if their write enable bits are set. This method cannot be used ...

Page 34

INFORMATION BLOCK WORDS Two words in the information blocks are dedicated to hold settings that affect the operation of the system: the Function Word in Information Block 0 and the Protection Word in In- formation Block 1. 8.4.1 Function ...

Page 35

Table 15 CPU Reset Behavior EMPTY ISPE Boot Area Not Empty ISP Defined Not Not Empty ISP Defined Not Empty No ISP Don’t Care Empty ISP Defined Not Empty ISP Defined Empty No ISP Don’t Care RDPROT The RDPROT field ...

Page 36

Flash Memory Information Block Address Register (FMIBAR/FSMIBAR) The FMIBAR register specifies the 8-bit address for read or write access to an information block. Because only word ac- cess to the information blocks is supported, the least signif- icant bit ...

Page 37

Flash Data Memory 0 Write Enable Register (FSM0WER) The FSM0WER register controls write protection for the flash data memory. The data block is divided into 16 512- byte sections. Each bit in the FSM0WER register controls write protection for ...

Page 38

Flash Memory Status Register (FMSTAT/ FSMSTAT) This register reports the currents status of the on-chip Flash memory. The FLSR register is clear after device reset. The CPU bus master has read/write access to this register ...

Page 39

Flash Memory Transition Time Reload Register (FMTRAN/FSMTRAN) The FMTRAN/FMSTRAN register is a byte-wide read/write register that controls some program/erase transition times. Software must not modify this register while program/erase operation is in progress (FMBUSY set). At reset, this regis- ...

Page 40

Flash Memory Recovery Time Reload Register (FMRCV/FSMRCV) The FMRCV/FSMRCV register is a byte-wide read/write register that controls the recovery delay time between two flash memory accesses. Software must not modify this reg- ister while a program/erase operation is in ...

Page 41

DMA Controller The DMA Controller (DMAC) has a register-based program- ming interface, as opposed to an interface based on I/O control blocks. After loading the registers with source and destination addresses, as well as block size and type of ...

Page 42

Direct mode supports two bus policies: intermittent and con- tinuous. In intermittent mode, the DMAC gives bus master- ship back to the CPU after every cycle. In continuous mode, the DMAC remains bus master until the transfer is complet- ed. ...

Page 43

If the DMASTAT.VLD bit is clear: 1. The transfer operation terminates. 2. The channel sets the DMASTAT.OVR bit. 3. The DMASTAT.CHAC bit is cleared interrupt is generated DMACNTLn.EOVR bit. The DMACNTLn.CHEN bit must be cleared before loading the ...

Page 44

Table 18 DMA Controller Registers Name Address ADCA2 FF F840h ADRA2 FF F844h ADCB2 FF F848h ADRB2 FF F84Ch BLTC2 FF F850h BLTR2 FF F854h DMACNTL2 FF F85Ch DMASTAT2 FF F85Eh ADCA3 FF F860h ADRA3 FF F864h ADCB3 FF F868h ...

Page 45

Block Length Register (BLTRn) The Block Length register is a 16-bit, read/write register. It holds the number of DMA transfers to be performed for the next block. Writing this register automatically sets the DM- ASTAT.VLD bit. 15 Block Length ...

Page 46

DMA Status Register (DMASTAT) The DMA status register is a byte-wide, read register that holds the status information for the DMA channel n. This register is cleared at reset. The reserved bits always return zero when read. The VLD, ...

Page 47

Interrupts The Interrupt Control Unit (ICU) receives interrupt requests from internal and external sources and generates interrupts to the CPU. Interrupts from the timers, UARTs, Microwire/ SPI interface, and Multi-Input Wake-Up module are all maskable interrupts. The highest-priority interrupt ...

Page 48

Interrupt Vector Register (IVCT) The IVCT register is a byte-wide read-only register which re- ports the encoded value of the highest priority maskable in- terrupt that is both asserted and enabled. The valid range is from 10h to 3Fh. ...

Page 49

Interrupt Enable and Mask Register 0 (IENAM0) The IENAM0 register is a word-wide read/write register which holds bits that individually enable and disable the maskable interrupt sources IRQ1 through IRQ15. The reg- ister is initialized to FFFFh at reset. ...

Page 50

MASKABLE INTERRUPT SOURCES Table 20 shows the interrupts assigned to various on-chip maskable interrupts. The priority of simultaneous maskable interrupts is linear, with IRQ47 having the highest priority. Table 20 Maskable Interrupts Assignment IRQ Number Description IRQ47 TWM (Timer ...

Page 51

Triple Clock and Reset The Triple Clock and Reset module generates a 12 MHz Main Clock and a 32.768 kHz Slow Clock from external crystal networks or external clock sources. It provides vari- ous clock signals for the rest ...

Page 52

EXTERNAL CRYSTAL NETWORK An external crystal network is connected to the X1CKI and X1CKO pins to generate the Main Clock, unless an external clock signal is driven on the X1CKI pin. A similar external crystal network may be used ...

Page 53

Table 22 Component Values of the Low Frequency Crystal Circuit Component Crystal Resonance Frequency Type Maximum Serial Resistance Maximum Shunt Capacitance Load Capacitance Min. Q factor Capacitor C1, C2 Capacitance Choose capacitor component values in the tables to obtain the ...

Page 54

SYSTEM CLOCK The System Clock drives most of the on-chip modules, in- cluding the CPU. Typically driven by the Main Clock, but it can also be driven by the PLL. In either case, the clock sig- nal ...

Page 55

Manual and SDI External Reset An external reset circuit based on the LM3724 5-Pin Micro- processor Reset Circuit is shown in Figure 9. The LM3724 produces a 190-ms logic low reset pulse when the power supply rises above a ...

Page 56

CLOCK AND RESET REGISTERS Table 23 lists the clock and reset registers. Table 23 Clock and Reset Registers Name Address CRCTRL FF FC40h PRSFC FF FC42h PRSSC FF FC44h PRSAC FF FC46h 11.9.1 Clock and Reset Control Register (CRCTRL) ...

Page 57

High Frequency Clock Prescaler Register (PRSFC) The PRSFC register is a byte-wide read/write register that holds the 4-bit clock divisor used to generate the high-fre- quency clock. In addition, the upper three bits are used to control the operation ...

Page 58

Power Management The Power Management Module (PMM) improves the effi- ciency of the CP3BT26 by changing the operating mode (and therefore the power consumption) according to the re- quired level of device activity. The device implements four power modes: ...

Page 59

IDLE MODE In Idle mode, the System Clock is disabled and therefore the clock is stopped to most modules of the device. The PLL and the high-frequency oscillator may be disabled as con- trolled by register bits. The low-frequency ...

Page 60

HALT The Halt Mode bit indicates whether the de- vice is in Halt mode. Before entering Halt mode, the WBPSM bit must be set. When the HALT bit is written with 1, the device enters the Halt mode at the ...

Page 61

Power Management Status Register (PMMSR) The Management Status Register (PMMR byte-wide, read/write register that provides status signals for the vari- ous clocks. The reset value of PMSR register bits de- pend on the status ...

Page 62

Entering Idle Mode Entry into Idle mode is performed by writing the PM- MCR.IDLE bit and then executing a WAIT instruction. The PMMCR.WBPSM bit must be set before the WAIT instruc- tion is executed. Idle mode ...

Page 63

Multi-Input Wake-Up The Multi-Input Wake-Up (MIWU) unit consists of two iden- tical 16-channel modules. Each module can assert a wake- up signal for exiting from a low-power mode, and each can assert an interrupt request on any of four ...

Page 64

Table 27 MIWU Sources MIWU Channel WUI0 WUI1 WUI2 WUI3 WUI4 WUI5 WUI6 WUI7 WUI8 WUI9 WUI10 WUI11 WUI12 WUI13 WUI14 WUI15 WUI16 WUI17 WUI18 WUI19 WUI20 WUI21 WUI22 WUI23 WUI24 WUI25 WUI26 WUI27 WUI28 WUI29 WUI30 WUI31 www.national.com 13.1 ...

Page 65

Wake-Up Edge Detection Register (WK0EDG) The WK0EDG register is a word-wide read/write register that controls the edge sensitivity of the MIWU channels. The WK0EDG register is cleared upon reset, which configures all channels to be triggered on rising edges. ...

Page 66

Wake-Up Interrupt Control Register 1 (WK0ICTL1) The WK0ICTL1 register is a word-wide read/write register that selects the interrupt request signal for the associated MIWU channels WUI7:0. At reset, the WK0ICTL1 register is cleared, which selects MIWU Interrupt Request 0 ...

Page 67

Wake-Up Pending Register (WK0PND) The WK0PND register is a word-wide read/write register in which the Multi-Input Wake-Up module latches any detect- ed trigger conditions. The CPU can only write any bit position in this register. If ...

Page 68

PROGRAMMING PROCEDURES To set up and use the Multi-Input Wake-Up function, use the following procedure. Performing the steps in the order shown will prevent false triggering of a wake-up condition. This same procedure should be used following a reset ...

Page 69

Input/Output Ports Each device has software-configurable I/O pins, or- ganized into 8-bit ports (not all bits are used in some ports). The ports are named Port B, Port C, Port E, Port F, Port G, Port ...

Page 70

Table 29 Port Registers Name Address PBALT FF FB00h PBDIR FF FB02h Port B Direction Register PBDIN FF FB04h Port B Data Input Register PBDOUT FF FB06h Port B Data Output Register Port B Weak Pull-Up PBWPU FF FB08h PBHDRV ...

Page 71

All of the port registers are byte-wide read/write registers, except for the port data input registers, which are read-only registers. Each register bit controls the function of the cor- responding port pin. For example, PGDIR.2 (bit 2 of the PGDIR ...

Page 72

Port High Drive Strength Register (PxHDRV) The PxHDRV register is a byte-wide, read/write register that controls the slew rate of the corresponding pins. The high drive strength function is enabled when the corresponding bits of the PxHDRV register are ...

Page 73

OPEN-DRAIN OPERATION A port pin can be configured to operate as an inverting open-drain output buffer this, the CPU must clear the bit in the data output register (PxDOUT) and then use the port direction register (PxDIR) ...

Page 74

... LMX5252 and other RF transceiver chips For a detailed description of the interface to the LMX5252, consult the LMX5252 data sheet which is available from the National Semiconductor wireless group. National provides software libraries for using the Bluetooth LLC. Documenta- tion for the software libraries is also available from National Semiconductor ...

Page 75

The RFSYNC signal is the alternate function of the general- purpose I/O pin PG0. At reset, this pin ...

Page 76

Write Operation When the R/W bit is clear, the 16 bits of the data field are shifted out of the CP3BT26 on the falling edge of SCLK. Data is sampled by the radio chip on the rising edge of SCLK. ...

Page 77

An example of a 32-bit write is shown in Table 31. In this ex- ample, the 32-bit value FFFF DC04h is written to register address 0Ah. In cycle 1, the high word (FFFFh) is written. In the first part of ...

Page 78

LMX5251 POWER-UP SEQUENCE To power-up a Bluetooth system based on the CP3BT26 and LMX5251 devices, the following sequence must be per- formed: 1. Apply VDD to the LMX5251. 2. Apply IOVCC and VCC to the CP3BT26. 3. Drive the ...

Page 79

Figure 25. LMX5252 Power-Up Sequence 15.5 BLUETOOTH SLEEP MODE The Bluetooth controller is capable of putting itself into a sleep mode for a specified number of Slow Clock cycles. In this mode, the controller clocks are stopped internally. The only ...

Page 80

BLUETOOTH SHARED DATA RAM The shared data RAM is a 4.5K memory-mapped section of RAM that contains the link control data, RF programming look-up table, and the link payload. This RAM can be read and written in the same ...

Page 81

Analog to Digital Converter The integrated 12-bit ADC provides the following features: ! 8-input analog multiplexer ! 8 single-ended channels or 4 differential channels ! External filtering capability ! 12-bit resolution with 11-bit accuracy ! Sign bit + ...

Page 82

The output of the Input Multiplexer is available externally as the MUXOUT0 and MUXOUT1 signals. In single-ended mode, only MUXOUT0 is used. In differential mode, MUXOUT0 is the positive side and MUXOUT1 is the nega- tive side. The MUXOUT0 and ...

Page 83

TOUCHSCREEN INTERFACE The ADC provides an interface for 4-wire resistive touch- screens with the resolution necessary for applications such as signature analysis. A typical touchscreen configuration is shown in Figure 28. Figure 28. Touchscreen Interface A touchscreen consists of ...

Page 84

Measuring Pen Force Figure 30 shows equivalent circuits for the driver modes used to measure the X, Y, and Z coordinates, in which Z rep- resents pen force. In this discussion, the ohmic resistance of the drivers is neglected ...

Page 85

By extension, the ADC negative voltage reference can be internally connected to the TSY- terminal, to recover the full 4096 values. The Global Configuration Register (ADCGCR) provides the flexibility to implement any of these techniques. 16.3 ADC OPERATION IN ...

Page 86

ADC Global Configuration Register (ADCGCR) The ADCGCR register controls the basic operation of the in- terface. The CPU bus master has read/write access to the ADCGCR register. After reset this register is set to 0000h ...

Page 87

PREF_CFG The Positive Voltage Reference Configuration field specifies the source of the ADC positive voltage reference, according to the following table: PREF_CFG NREF_CFG The Negative Voltage Reference Configura- tion field specifies the source of the ADC ...

Page 88

ADC Conversion Control Register (ADCCNTRL) The ADCCNTRL register specifies the trigger conditions for an ADC conversion. 15 Reserved POL The ASYNC Polarity bit specifies the polarity of edges which trigger ADC conversions. 0 – ASYNC input is sensitive to ...

Page 89

ADC Result Register (ADCRESLT) The ADCRESLT register includes the software-visible end of a 4-word FIFO. Conversion results are loaded into the FIFO from the 12-bit ADC and unloaded when software reads the ADCRESLT register. The ADCRESLT register is read-only. ...

Page 90

Random Number Generator (RNG) The RNG unit is a hardware “true random” number genera- tor. When enabled, this unit provides up to 800 random bits per second. The bits are available for reading from a 16-bit register. The RNG ...

Page 91

RANDOM NUMBER GENERATOR REGISTER SET Table 34 lists the RNG registers. Table 37 RNG Registers Name Address RNGCST FF F280h RNGD FF F282h RNG Divisor Register RNGDIVH FF F284h RNG Divisor Register RNGDIVL FF F286h 17.2.1 RNG Control and ...

Page 92

USB Controller The CR16 USB node is an integrated USB node controller that features enhanced DMA support with many automatic data handling features compatible with USB specifica- tion versions 1.0 and 1.1. It integrates the required USB ...

Page 93

ENDPOINT OPERATION 18.2.1 Address Detection Packets are broadcast from the host controller to all nodes on the USB network. Address detection is implemented in hardware to allow selective reception of packets and to per- mit optimal use of CPU ...

Page 94

Bidirectional Control Endpoint FIFO0 Operation FIFO0 should be used for the bidirectional control endpoint 0. It can be configured to receive data sent to the default ad- dress with the DEF bit in the EPC0 register. Isochronous transfers are not ...

Page 95

Receive Endpoint FIFO Operation (RXFIFO1, RXFIFO2, RXFIFO3) The Receive FIFOs for endpoints 2, 4, and 6 support bulk, interrupt, and isochronous USB packet transfers larger than the actual FIFO size. If the packet length exceeds the FIFO size, software must ...

Page 96

Table 40 USB Controller Registers Name Address EPC0 FF FDC0h EPC1 FF FDD0h EPC2 FF FDD8h EPC3 FF FDE0h EPC4 FF FDDE8h EPC5 FF FDF0h EPC6 FF FDF8h TXS0 FF FDC4h TXS1 FF FDD4h TXS2 FF FDE4h TXS3 FF FDF4h ...

Page 97

NAT The Node Attached indicates that this node is ready to be detected as attached to USB. When clear, the transceiver forces SE0 on the USB node controller to prevent the hub (to which this node is connected) from detecting ...

Page 98

Main Event Register (MAEV) The Main Event Register summarizes and reports the main events of the USB transactions. This register provides read- only access. The MAEV register is clear after reset INTR RX_EV ULD ...

Page 99

SD3 The Suspend Detect 3 ms bit is set after IDLE have been detected on the upstream port, indicating that the device should be sus- pended. The suspend occurs under software control by writing the suspend value ...

Page 100

Receive Event Register (RXEV) The RXEV register reports the current status of the FIFO, used by the three Receive Endpoints. The RXEV register is clear after reset. It provides read-only access from the CPU bus RXOVRRN ...

Page 101

FIFO Warning Event Register (FWEV) The FWEV register signals whether a receive or transmit FIFO has reached its warning limit. It reports the status for all FIFOs, except for the Endpoint 0 FIFO warning limit can be ...

Page 102

MF The Missed SOF bit is set when the frame number in a valid received SOF does not match the expected next value, or when an SOF is not received within 12060 bit times. The MF bit provides read-only access. ...

Page 103

DTGL The DMA Toggle bit is used to determine the initial state of Automatic DMA (ADMA) opera- tions. Software initially sets this bit if starting with a DATA1 operation, and clears this bit if starting with a DATA0 operation. Writes ...

Page 104

DMA Mask Register (DMAMSK) Any set bit in the DMAMSK register enables automatic set- ting of the DMA bit in the ALTEV register when the respec- tive event in the DMAEV register occurs. Otherwise, setting the DMA bit is ...

Page 105

The erroneous packet is ignored and not transferred via DMA. If this bit is cleared, automatic error handling ceases. 18.3.24 Endpoint Control 0 Register (EPC0) The EPC0 register controls the mandatory Endpoint clear ...

Page 106

FLUSH Writing the Flush FIFO bit flushes all data from the control endpoint FIFOs, resets the endpoint to Idle state, clears the FIFO read and write pointer, and then clears itself. If the endpoint is currently using ...

Page 107

FLUSH Writing 1 to the Flush bit flushes all data from the control endpoint FIFOs, resets the end- point to Idle state, clears the FIFO read and write pointer, and then clears itself. If the end- point is currently using ...

Page 108

ACK_STAT The Acknowledge Status bit is valid when the TX_DONE bit is set. The meaning of the ACK_STAT bit differs depending on whether ISO or non-ISO operation is used (as selected by the ISO bit in the EPCn register). ! ...

Page 109

TFWL The Transmit FIFO Warning Limit bits specify how many more bytes can be transmitted from the respective FIFO before an underrun con- dition occurs. If the number of bytes remaining in the FIFO is equal to or less than ...

Page 110

Receive Command Register n (RXCn) Each of the receive endpoints (2, 4, and 6) has one RXCn register. The registers provide read/write access from the CPU bus. Reading reserved bits returns undefined data. Af- ter reset clear. ...

Page 111

CAN Module The CAN module contains a Full CAN class, CAN (Control- ler Area Network) serial bus interface for low/high speed ap- plications. It supports reception and transmission of extended frames with a 29-bit identifier, standard frames with an ...

Page 112

CAN CORE INTERFACE MANAGEMENT Interface Management Interface Management 19.2 BASIC CAN CONCEPTS This section provides a generic overview of the basic con- cepts of the Controller Area Network (CAN). The CAN protocol is a message-based protocol that allows 11 a ...

Page 113

The CAN protocol allows several transmitting modules to start a transmission at the same time as soon as they detect the bus is idle. During the start of transmission, every node monitors the bus line to detect whether its message ...

Page 114

Data Length Code (DLC) The DLC field indicates the number of bytes in the data field. It consists of four bits. The data field can be of length zero. The admissible number of data bytes for a data frame rang- ...

Page 115

A CAN data frame consists of the following fields: ! Start of Frame (SOF) ! Arbitration Field + Extended Arbitration ! Control Field ! Data Field ! Cyclic Redundancy Check Field (CRC) Arbitration Field 11 d IDENTIFIER 10 ... 0 ...

Page 116

Error Frame As shown in Figure 43, the Error Frame consists of the error flag and the error delimiter bit fields. The error flag field is built up from the various error flags of the different nodes. Therefore, its length ...

Page 117

ANY FRAME INT = Intermission Suspend Transmission is only for error passive nodes. 19.2.4 Error Types Bit Error A CAN device which is currently transmitting also monitors the bus. If the monitored bit value ...

Page 118

Error Active An error active unit can participate in bus communication and may send an active (“dominant”) error flag. Error Warning The Error Warning state is a sub-state of Error Active to in- dicate a heavily disturbed bus. The CAN ...

Page 119

Bit Time Logic In the Bit Time Logic (BTL), the CAN bus speed and the Synchronization Jump Width can be configured by software. The CAN module divides a nominal bit time into three time segments: synchronization segment, time segment ...

Page 120

Bus Signal CAN Clock PREVIOUS A BIT PREVIOUS A BIT Bus Signal CAN Clock PREVIOUS BIT PREVIOUS BIT 19.2.7 Clock Generator The CAN prescaler (PSC) is shown is Figure 50. It divides the CKI input clock by the value defined ...

Page 121

BASIC-CAN path. For reception of data frame or remote frames, the CAN module follows a “receive on first match” rule which means that a given message is only received ...

Page 122

With this lock function, software has the capability to save several messages with the same identifier or same identifier group into more than one buffer. For ex- ample, a buffer with the second highest priority will receive ...

Page 123

All contents of the hidden receive buffer are always copied into the respective receive buffer. This includes the received message ID as well as the received Data Length Code (DLC); therefore when some mask bits are set to don’t care, ...

Page 124

Read buffer Read CNSTAT Yes RX_READY? No Yes RX_BUSYx? No Interrupt Entry Point RX_OVERRUN? Write RX_READY Read buffer (id/data/control) Read CNSTAT Yes RX_BUSYx? No Yes RX_FULL or RX_OVERRUN? No Clear RX_PND Exit Figure 57. Buffer Read Routine (BUFFLOCK Disabled) The ...

Page 125

CNSTAT status section will be 0101b, as the buffer was RX_FULL (0100b) before. After finally reading the last re- ceived message, the CPU can reset the buffer to RX_READY. 19.6 TRANSMIT STRUCTURE To transmit a CAN message, software must configure ...

Page 126

TXPRI value and the 4-bit buffer number (0...14) as shown below. The lowest resulting num- ber results in the highest transmit priority TXPRI Table 47 shows the transmit priority configuration if ...

Page 127

TX Buffer States The transmission process can be started after software has loaded the buffer registers (data, ID, DLC, PRI) and set the buffer status from TX_NOT_ACTIVE to TX_ONCE, TX_RTR, or TX_ONCE_RTR. When the CPU writes TX_ONCE, the buffer ...

Page 128

Highest Priority Interrupt Code To reduce the decoding time for the CIPND register, the buffer interrupt request with the highest priority is placed as interrupt status code into the IST[3:0] section of the CSTP- ND register. Each of the ...

Page 129

MEMORY ORGANIZATION The CAN module occupies 144 words in the memory ad- dress space. This space is organized as 15 banks of 8 words per bank (plus one reserved bank) for the message buffers and 14 words (plus 2 ...

Page 130

CAN CONTROLLER REGISTERS Table 51 lists the CAN module registers. Table 51 CAN Controller Registers Name Address See CNSTAT Table 50. CGCR 0E F100h CTIM 0E F102h GMSKX 0E F104h GMSKB 0E F106h BMSKX 0E F108h BMSKB 0E F10Ah ...

Page 131

Table 52 Buffer Status Section of the CNSTAT Register ST3 (DIR) ST2 ST1 ...

Page 132

PRI The Transmit Priority Code field holds the software-defined transmit priority code for the message buffer. DLC The Data Length Code field determines the number of data bytes within a received/trans- mitted frame. For transmission, these bits need to be ...

Page 133

Storage of Messages with Less Than 8 Data Bytes The data bytes that are not used for data transfer are “don’t cares”. If the object is transmitted, the data within these bytes will be ignored. If the object is ...

Page 134

Storage of Remote Messages During remote frame transfer, the buffer registers DATA0– DATA3 are “don’t cares” remote frame is transmitted, the contents of these registers are ignored remote Buffer Address 15 14 Register 0E F0XEh ...

Page 135

CAN Global Configuration Register (CGCR) The CAN Global Configuration Register (CGCR 16-bit wide register used to: ! Enable/disable the CAN module. ! Configure the BUFFLOCK function for the message buff- er 0..14. ! Enable/disable the time stamp ...

Page 136

Sequence of Data Bytes on the Bus ID Data1 Storage of Data Bytes in the Buffer Memory Setting the DDIR bit will cause the direction of the data stor- age to be reversed — the last byte received is stored ...

Page 137

INTERNAL If the Internal function is enabled, the CANTX and CANRX pins of the CAN module are inter- nally connected to each other. This feature can be used in conjunction with the LOOP- BACK mode. This means that the CAN ...

Page 138

TSEG1 The Time Segment 1 field configures the length of the Time Segment 1 (TSEG1 not recommended to configure the time seg- ment smaller than 2 time quanta. (see Table 59). Table 59 Time Segment ...

Page 139

Basic Mask Register (BMSKB/BMSKX) The BMSKB and BMSKX registers allow masking the buffer 14, or “don’t care” the incoming extended/standard identifier bits, RTR/XRTR, and IDE. Throughout this document, the two 16-bit registers BMSKB and BMSKX are referenced to as ...

Page 140

CAN Interrupt Clear Register (CICLR) The CICLR register bits individually clear CAN interrupt pending flags caused by the message buffers and from the Error Management Logic. Do not modify this register with in- structions that access the register as ...

Page 141

CAN Error Counter Register (CANEC) The CANEC register reports the values of the CAN Receive Error Counter and the CAN Transmit Error Counter REC 0 R REC The CAN Receive Error Counter field reports the value ...

Page 142

CAN Timer Register (CTMR) 19.11 SYSTEM START-UP AND MULTI-INPUT WAKE- Note: 19.11.1 External Connection Table 64 External CAN Pins Signal Name Type Description 19.11.2 Transceiver Connection CPU Bus VCC CR16CAN Transceiver Chip 3 VCC 5 ...

Page 143

Table 65 CAN Module Internal Timing Cycle Task Count ! ! ! ! ! ! ! ! Occurrence/ Table 66 Minimum Clock Frequency Requirements Frame Baud Rate 19.11.4 Bit Time Logic Calculation Examples ! ! ! ! ! ! 19.11.5 ...

Page 144

USAGE HINT ! ! ...

Page 145

Advanced Audio Interface 20.1 AUDIO INTERFACE SIGNALS 20.1.1 Serial Transmit Data (STD) 20.1.2 Serial Transmit Clock (SCK) 20.1.3 Serial Transmit Frame Sync (SFS) 20.1.4 Serial Receive Data (SRD) 20.1.5 Serial Receive Clock (SRCLK) 20.1.6 Serial Receive Frame Sync (SRFS) ...

Page 146

Synchronous Mode 20.2.3 Normal Mode Long Frame Sync (SFS/SRFS) High-impedance Shift Data Data (STD/SRD) Frame Figure 68. Normal Mode Frame IRQ Support DMA Support SRD ARSR DMA Slot Assignment STD ATSR DMA Slot Assignment Figure 69. IRQ/DMA Support in ...

Page 147

Long Frame Sync (SFS/SRFS) Data Data Shift Data (ignored) (valid) (STD/SRD) Slot0 Slot1 Frame Figure 70. Network Mode Frame IRQ Support DMA Support SRD High-impedance Data (ignored) STD Unused Slots DS055 Figure 71. IRQ/DMA Support in Network Mode DMA Request ...

Page 148

Figure 72. Accessing Three Devices in Network Mode 20.3 BIT CLOCK GENERATION 20.4 FRAME CLOCK GENERATION 20.5 AUDIO INTERFACE OPERATION 20.5.1 Clock Configuration PRSAC &= 0xF0; // Set Aux1 prescaler MHz) CRCTRL |= ACE1; // ...

Page 149

RXIE RXIP = 1 RXEIE RXEIP = 1 TXIE TXIP = 1 TXEIE TXEIP = 1 Figure 73. AAI Interrupt Structure 20.5.3 Normal Mode 20.5.4 Transmit DMA Operation FIFO Operation AAI Interrupt 20.5.5 Receive DS155 DMA Operation FIFO Operation ...

Page 150

Network Mode 20.5.7 Transmit DMA Operation FIFO Operation 20.5.8 Receive DMA Operation FIFO Operation 20.6 COMMUNICATION OPTIONS 20.6.1 Data Word Length 20.6.2 Frame Sync Signal ...

Page 151

Bit Shift Clock (SCK/SRCLK) Shift Data (STD/SRD) Short Frame Sync Pulse Long Frame Sync Pulse Figure 74. Short and Long Frame Sync Pulses SCK SFS STD Figure 75. Audio Slot with ...

Page 152

IOM-2 Mode SFS STD/SRD CP3BT2 x Figure 77. CP3BT26/ISDN Controller Connections ! ! ! ! ! IC1 IC2 M C IOM-2 Channel 0 IOM-2 Channel 1 IOM-2 Channel 2 IOM-2 Frame (125 µs) Figure 76. ...

Page 153

Freeze Mode ! ! ! ! 20.7 AUDIO INTERFACE REGISTERS Table 67 Audio Interface Registers Name Address Description ...

Page 154

Audio Receive FIFO Register (ARFR) 20.7.2 Audio Receive DMA Register n (ARDRn) 20.7.3 Audio Transmit FIFO Register (ATFR) 20.7.4 Audio Transmit DMA Register n (ATDRn) ...

Page 155

Audio Global Configuration Register (AGCR) Number of SCS Slots per Frame Mode FSL Frame Sync Length ...

Page 156

Audio Interrupt Status and Control Register (AISCR) ...

Page 157

Audio Receive Status and Control Register (ARSCR) RXSA Bit Slots Enabled Slots Enabled RXDSA Bit for DMA ...

Page 158

Audio Transmit Status and Control Register (ATSCR) TXSA Bit Slots Enabled Slots Enabled TXDSA Bit for DMA ...

Page 159

Audio Clock Control Register (ACCR) 20.7.10 Audio DMA Control Register (ADMACR) RMD DMA Request Condition TMD DMA Request Condition ...

Page 160

CVSD/PCM Conversion Module 16-Bit 8 kHz u/A-Law Figure 78. CVSD/PCM Converter Block Diagram 21.1 OPERATION PRSAC &= 0x0f; // Set Aux2 prescaler to generate // 2 MHz (Fsys = 12 MHz) PRSAC |= 0x50; CRCTRL |= ACE2; // Enable ...

Page 161

CVSD CONVERSION 21.4 PCM TO CVSD CONVERSION 21.5 CVSD TO PCM CONVERSION 21.6 INTERRUPT GENERATION ! ! ! ! ! ! 21.7 DMA SUPPORT ! ! ! ! ...

Page 162

FREEZE ! ! ! ! ! ! ! 21.9 CVSD/PCM CONVERTER REGISTERS Table 68 CVSD/PCM Registers Name Address Table 68 CVSD/PCM Registers Name 21.9.1 CVSD Data Input Register (CVSDIN) 21.9.2 CVSD Data Output Register (CVSDOUT) 21.9.3 PCM ...

Page 163

Logarithmic PCM Data Input Register (LOGIN) 21.9.6 Logarithmic PCM Data Output Register (LOGOUT) 21.9.7 Linear PCM Data Input Register (LINEARIN) 21.9.8 Linear PCM Data Output Register (LINEAROUT) 21.9.9 CVSD Control Register (CVCTRL) ...

Page 164

CVSD Status Register (CVSTAT) ...

Page 165

UART Modules ! ! ! ! ! ! ! ! ! ! ! ! 22.1 FUNCTIONAL OVERVIEW ! ! ! ! 22.2 UART OPERATION 22.2.1 Asynchronous Mode ...

Page 166

Figure 79. UART Block Diagram Sample STARTBIT DATABIT Figure 80. UART Asynchronous Communication Sample 8 9 ...

Page 167

Synchronous Mode CKX TDX RDX Sample Input Figure 81. UART Synchronous Communication 22.2.3 Attention Mode DS062 22.2.4 Diagnostic Mode 22.2.5 Frame Format Selection Start 1 7-Bit Data Bit Start 1a 7-Bit Data Bit Start 1b 7-Bit Data Bit Start ...

Page 168

Start 2 8-Bit Data Bit Start 2a 8-Bit Data Bit Start 2b 8-Bit Data Bit Start 2c 8-Bit Data Bit Figure 83. 8-Bit Data Frame Options Start 3 9-Bit Data Bit Start 3a 9-Bit Data Bit Figure 84. 9-bit Data ...

Page 169

UFE UDOE UPE ! ! UEEI UERR UERI URBF UETI UTBE UEFCI UDCTS Figure 85. UART Interrupts 22.2.8 DMA Support 22.2.9 Break Generation and Detection 22.2.10 Parity Generation and Detection RX Interrupt TX Interrupt FC Interrupt DS066 ...

Page 170

UART REGISTERS Table 70 UART Registers Name Address Table 70 UART Registers Name Description Address Description ...

Page 171

Table 70 UART Registers Name Address 22.3.1 UART Receive Data Buffer (UnRBUF) 22.3.2 UART Transmit Data Buffer (UnTBUF) 22.3.3 UART Baud Rate Prescaler (UnPSR) 22.3.4 UART Baud Rate Divisor (UnBAUD) Description 22.3.5 UART Frame Select Register (UnFRS) ...

Page 172

UART Mode Select Register 1 (UnMDSL1) 22.3.7 UART Status Register (UnSTAT) ...

Page 173

UART Interrupt Control Register (UnICTRL) 22.3.9 UART Oversample Rate Register (UnOVR) UOVSR3:0 Oversampling Rate ...

Page 174

UART Mode Select Register 2 (UnMDSL2) 22.3.11 UART Sample Position Register (UnSPOS) Oversampling Rate 22.4 BAUD RATE CALCULATIONS 22.4.1 Asynchronous Mode Sample Position ----------------------------- - ------------------------------ - = = ----------------- - = ...

Page 175

Synchronous Mode = ---------------------------- - SYS_CLK = 48 MHz Baud Rate %err Table 71 Baud Rate Programming SYS_CLK = 24 MHz SYS_CLK = 12 MHz %err O N SYS_CLK = 10 MHz P ...

Page 176

SYS_CLK = 8 MHz Baud Rate %err SYS_CLK = 3 MHz Baud Rate %err Table 72 Baud Rate Programming SYS_CLK = 6 MHz SYS_CLK = 5 MHz %err O N SYS_CLK ...

Page 177

Microwire/SPI Interface Master 23.1 MICROWIRE OPERATION ! ! ! ! ! ! ! ! ! ! ! ! Figure 86. Microwire Interface 23.1.1 Shifting Slave ...

Page 178

Interrupt Request Write Data Write Data System Clock 23.1.2 Reading 23.1.3 Writing Control + Status 16-BIt Read Buffer MWDAT 8 8 Slave 16-BIt Shift Register Data Out Master Slave Data In Master MSK Clock Prescaler + Select Master Figure 87. ...

Page 179

MASTER MODE MSK Shift Out MSB Data Out Sample Point Data In MSB MSK Shift Out MSB Data Out Sample Point MSB Data In MSK Shift Out Data Out MSB Sample Point Data In MSB MSK Shift Out Data ...

Page 180

SLAVE MODE 23.4 INTERRUPT GENERATION Table 73 Microwire Interrupt Trigger Condition Interrupt Status Enable Bit Bit in the Condition in the MWSTAT MWCTRL1 Register Register Figure 92. MWSPI Interrupts Description ...

Page 181

MICROWIRE INTERFACE REGISTERS Table 74 Microwire Interface Registers Name Address 23.5.1 Microwire Data Register (MWDAT) Figure 93. MWDAT Register 23.5.2 MICROWIRE Control Register (MWCTL1) Description Pin State When Disabled ...

Page 182

Microwire Status Register (MWSTAT) ...

Page 183

ACCESS.bus Interface ! ! ! ! 24.1 ACB PROTOCOL OVERVIEW 24.1.1 Data Transactions SDA SCL Data Line Change Stable: of Data Data Valid Allowed Figure 94. Bit Transfer Start and Stop SDA SCL S Start Condition Figure 95. Start ...

Page 184

Acknowledge Cycle Acknowledgment Signal from Receiver SDA MSB SCL ACK Start Condition Byte Complete Interrupt Within Receiver Figure 96. ACCESS.bus Data Transaction Data Output by Transmitter Data Output by Receiver 3 ...

Page 185

ACB FUNCTIONAL DESCRIPTION 24.2.1 Master Mode Sending the Address Byte Master Transmit Master Receive Master Stop ...

Page 186

Master Bus Stall ! ! ! Repeated Start Master Error Detections Bus Idle Error Recovery 24.2.2 Slave Mode ! ! ! Slave Receive and Transmit Slave Bus Stall Slave Error Detections ...

Page 187

Power Down 24.2.3 SDA and SCL Pins Configuration 24.2.4 ACB Clock Frequency Configuration 24.3 ACCESS.BUS INTERFACE REGISTERS Table 75 ACCESS.bus Interface Registers Name Address 24.3.1 ACB Serial Data Register (ACBSDA) 24.3.2 ACB Status Register (ACBST) Description ...

Page 188

ACB Control Status Register (ACBCST ...

Page 189

ACB Control Register 1 (ACBCTL1) ...

Page 190

ACB Control Register 2 (ACBCTL2) 24.3.6 ACB Control Register 3 (ACBCTL3) ...

Page 191

ACB Own Address Register 1 (ACBADDR1) 24.3.8 ACB Own Address Register 2 (ACBADDR2) 24.4 USAGE HINTS ! ! ! ! ...

Page 192

Avoiding Bus Error During Write Transaction /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; NAME: ACBRead Reads "Count" byte(s) from selected I2C Slave. ; Read or Write operation (as recorded in NextAddress), a "dummy" write transaction is ; initiated to reset the address to the ...

Page 193

ACBSTOP; return (ACB_NOERR); } /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; NAME: ACBStartX Initiates an ACB bus transaction by sending the Start bit, followed by the Slave address ; and R/W flag PARAMETERS: UBYTE Slave - ; UBYTE R_nW - ; ...

Page 194

Timing and Watchdog Module 25.1 TWM STRUCTURE REAL TIME TIMER (T0) Slow Clock WATCHDOG Figure 99. Timing and Watchdog Module Block Diagram 25.2 TIMER T0 OPERATION ---------------------------------------------------------------------- - T0IN 5-Bit Prescaler Counter (TWCP) TWW/MT0 Register T0CSR Contrl. Reg. Restart ...

Page 195

WATCHDOG OPERATION ! ! ! 25.3.1 Register Locking 25.3.2 Power Save Mode Operation Note: 25.4 TWM REGISTERS Table 76 TWM Registers Name Address Description ...

Page 196

Timer and Watchdog Configuration Register (TWCFG) 25.4.2 Timer and Watchdog Clock Prescaler Register (TWCP) Clock Divisor MDIV (f = 32.768 kHz) SCLK 25.4.3 TWM Timer 0 Register (TWMT0) T0IN Frequency ...

Page 197

TWMT0 Control and Status Register (T0CSR) 25.4.5 Watchdog Count Register (WDCNT) 25.4.6 Watchdog Service Data Match Register (WDSDM) 25.5 WATCHDOG PROGRAMMING PROCEDURE ...

Page 198

Multi-Function Timer ! ! ! Clock Source System Clock Figure 100. Multi-Function Timer Block Diagram 26.1.1 Timer/Counter Block ! ! ! ! Prescaler Register TPRSC Reset 5-Bit System Prescaler Counter Clock TB Synchr. Figure 101. Multi-Function Timer Clock Source ...

Page 199

Counter Clock Source Select ! ! ! ! ! Prescaler Prescaler Output TB Counter Clock Slow Clock Limitations in Low-Power Modes External Event Clock Pulse Accumulate Mode Figure 102. Pulse-Accumulate Mode 26.2 TIMER OPERATING MODES ! ! ! ! DS083 ...

Page 200

Mode 1: Processor-Independent PWM Timer 1 Clock Timer 2 Clock Clock Selector Figure 103. Processor-Independent PWM Mode Reload A = Time 1 TAPND TCRA Underflow TAIEN Timer/Counter 1 TCNT1 TAEN Underflow TBIEN Reload B = Time 2 TBPND TCRB ...

Related keywords