1 Intro
2
Electrocardiogram (
Ecg
) Signals
The Electrocardiogram (
Ecg
)
•
Ecg
: electrical manifestation of heart activity recorded
from the body surface
•
monitoring of heart rate
The
Ecg
signal can be recorded fairly easily with surface
electrodes placed on the limbs and/or the chest, see pages
6
–
16
below.
Josef Goette
2
2009
4 Peripherals
4.14 Controller Area Network (CAN)
Controller-area network (CAN or CAN-bus) is a vehicle bus standard designed to allow micro-
controllers and devices to communicate with each other within a vehicle without a host computer.
It was designed specifically for automotive applications but is now also used in other areas. De-
velopment of the CAN-bus started originally in 1983 at Robert Bosch GmbH. The protocol was
officially released in 1986 at the Society of Automotive Engineers (SAE) congress in Detroit, Michi-
gan. The first CAN controller chips, produced by Intel and Philips, came on the market in 1987.
Bosch published the CAN 2.0 specification in 1991.
The STM32F103RB CAN is compliant with specifications 2.0A and B (active) with a bit rate up to
1 Mbit/s. It can receive and transmit standard frames with 11-bit identifiers as well as extended
frames with 29-bit identifiers. It has three transmit mailboxes, two receive FIFOs with 3 stages
and 14 scalable filter banks.
can1
F
Sends the string hello with 500Bit/s over the CAN. Receives the internal looped signal
b
using polling (mode: CAN Mode LoopBack). Therefore no message can be received! Uses the
serial interface at 115200Baud.
can2
F
As can1 but able to receive CAN data (mode: CAN Mode Normal).
b
Controller area network (bxCAN)
RM0008
492/682
Note:
In Medium-density and High-density devices the USB and CAN share a dedicated 512-byte
SRAM memory for data transmission and reception, and so they cannot be used
concurrently (the shared SRAM is accessed through CAN and USB exclusively). The USB
and CAN can be used in the same application but not at the same time.
21.2.1 General
description
In today’s CAN applications, the number of nodes in a network is increasing and often
several networks are linked together via gateways. Typically the number of messages in the
system (and thus to be handled by each node) has significantly increased. In addition to the
application messages, Network Management and Diagnostic messages have been
introduced.
●
An enhanced filtering mechanism is required to handle each type of message.
Furthermore, application tasks require more CPU time, therefore real-time constraints
caused by message reception have to be reduced.
●
A receive FIFO scheme allows the CPU to be dedicated to application tasks for a long
time period without losing messages.
The standard HLP (Higher Layer Protocol) based on standard CAN drivers requires an
efficient interface to the CAN controller.
Figure 190. CAN network topology
CAN 2.0B active core
The bxCAN module handles the transmission and the reception of CAN messages fully
autonomously. Standard identifiers (11-bit) and extended identifiers (29-bit) are fully
supported by hardware.
Control, status and configuration registers
The application uses these registers to:
●
Configure CAN parameters, e.g. baud rate
●
Request transmissions
●
Handle receptions
●
Manage interrupts
●
Get diagnostic information
CAN no
de 1
CAN nod
e 2
CAN nod
e n
CAN
CAN
High
Low
CAN
CAN
Rx
Tx
CAN
Transceiver
CAN
Controller
MCU
CAN Bus
Application
Figure 4.15:
CAN Network Topology
!
By default the CAN and USB share same pins PA11/EXT1-1 and PA12/EXT1-3, so you can’t use
both CAN and USB on same time. A remap (see example) can be done to PB8/PB9.
!
Make sure you set up a filter even if you want to receive all CAN messages.
40
STM32 Cortex-M3 Tutorial