Example For Bit Timing At Low Baudrate; Configuration Of The Message Memory - Bosch TTCAN User Manual

Ttcan ip module user's manual
Table of Contents

Advertisement

TTCAN

4.2.1.8 Example for Bit Timing at low Baudrate

In this example, the frequency of CAN_CLK is 2 MHz, BRP is 1, the bit rate is 100 KBit/s.
t
q
delay of bus driver
delay of receiver circuit
delay of bus line (40m)
t
Prop
t
SJW
t
TSeg1
t
TSeg2
t
Sync-Seg
bit time
tolerance for CAN_CLK 1.58
In this example, the concatenated bit time parameters are (4-1)
Timing Register is programmed to= 0x34C1.
4.2.2 Configuration of the Message Memory
The whole Message Memory has to be configured before the end of the initialisation, but is
also possible to change the configuration of Message Objects during CAN communication.
The CAN software driver library should offer subroutines that:
Transfer a complete message structure into a Message Object. (Configuration)
Transfer the data bytes of a message into a Message Object and set TxRqst and NewDat.
(Start a new transmission)
Get the data bytes of a message from a Message Object and clear NewDat (and IntPnd).
(Read received data)
Get the complete message from a Message Object and clear NewDat (and IntPnd).
(Read a received message, including identifier, from a Message Object with UMask = '1')
Parameters of the subroutines are the Message Number and a pointer to a complete
message structure or to the data bytes of a message structure.
Two methods are possible to assign the IFx Interface Register sets to these subroutines. In the
first method, the tasks of the application program that may access the module are assorted in
two groups. Each group is restricted to the use of one of the Interface Register sets. The tasks
of one group may interrupt tasks of the other group, but not of the same group.
In the second method, which may be a special case of the first method, there are only two
tasks is the application program that access the module. A Read_Message task that uses
IFC1 to get received messages (full messages or data bytes only) from the Message RAM and
a Write_Message task that uses IFC2 to write messages to be transmitted (or to be
configured) into the Message RAM. Both tasks may interrupt each other.
The CAN communication may be controlled interrupt-driven or by polling. The module's
Interrupt Register points to Message Objects with IntPnd = '1'. It is updated even if the
interrupt line to the CPU is disabled (IE = '0').
BOSCH
User's Manual
1
s
= 2 • t
CAN_CLK
200
ns
80
ns
220
ns
1
s
= 1 • t
q
4
s
= 4 • t
q
5
s
= t
Prop
4
s
= Information Processing Time + 3 • t
1
s
= 1 • t
q
10
s
= t
Sync-Seg
%
=
---------------------------------------------------------------- -
2
=
--------------------------------------------------------- -
2
- 53/77 -
+ t
SJW
+ t
+ t
TSeg1
TSeg2
min PB 1 PB 2
13 bit time PB 2
4 s
13 10 s 4 s
&(5-1)
3
4
Revision 1.6
q
&(4-1)
&(2-1)
, the Bit
2
6
11.11.02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents