TTCAN

User’s Manual

Revision 1.6

manual_about.fm

The LEC field holds a code which indicates the type of the last error to occur on the CAN bus. This field will be cleared to ‘0’ when a message has been transferred (reception or transmis- sion) without error. The unused code ‘7’ may be written by the CPU to check for updates.

3.2.2.1 Status Interrupts

A Status Interrupt is generated by bits BOff and EWarn (Error Interrupt, EIE) or by RxOk, TxOk, and LEC (Status Change Interrupt, SIE) assumed that the corresponding enable bits in the CAN Control Register are set. A change of bit EPass or a CPU write to RxOk, TxOk, or LEC will never generate a Status Interrupt.

When SIE is set, a Status Interrupt will be generated at each CAN bus error and at each valid CAN message, independent of the Message RAM configuration.

Reading the Status Register will clear the Status Interrupt value (8000h) in the Interrupt Register, if it is pending.

3.2.3 Error Counter (addresses 0x05 & 0x04)

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

 

RP

 

 

 

REC6-0

 

 

 

 

 

 

TEC7-0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

r

 

 

 

r

 

 

 

 

 

 

 

r

 

 

 

RP

 

Receive Error Passive

 

 

 

 

 

 

 

 

 

 

 

 

 

one

The Receive Error Counter has reached the error passive level as defined

 

 

 

 

in the CAN Specification.

 

 

 

 

 

 

 

 

 

 

 

zero

The Receive Error Counter is below the error passive level.

 

 

REC6-0Receive Error Counter

Actual state of the Receive Error Counter. Values between 0 and 127.

TEC7-0Transmit Error Counter

Actual state of the Transmit Error Counter. Values between 0 and 255.

3.2.4 Bit Timing Register (addresses 0x07 & 0x06)

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

res

 

TSeg2

 

 

TSeg1

 

 

SJW

 

 

 

BRP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

r

 

rw

 

 

 

rw

 

 

rw

 

 

 

rw

 

 

TSeg1 The time segment before the sample point

0x01-0x0Fvalid values for TSeg1 are [1 … 15]. The actual interpretation by the hardware of this value is such that one more than the value programmed here is used.

TSeg2 The time segment after the sample point

0x0-0x7valid values for TSeg2 are [0 … 7]. The actual interpretation by the hardware of this value is such that one more than the value programmed here is used.

SJW (Re)Synchronisation Jump Width

0x0-0x3Valid programmed values are 0-3. The actual interpretation by the hardware of this value is such that one more than the value programmed here is used.

BOSCH

- 19/77 -

11.11.02

Page 19
Image 19
Bosch Appliances TTCAN user manual Status Interrupts, Error Counter addresses 0x05, Bit Timing Register addresses 0x07