How does it work?
CAN FD Click features TLE9252V high speed CAN network transceiver from Infineon. HS CAN is a serial bus system which connects microcontrollers, sensors and actuators for real-time control applications. The TLE9252V supports both Bus Wake-up Pattern (WUP) functionality and Local Wake-up, as well as CAN Flexible data rate transmission up to 5Mbit/s. Additionally, the TLE9252V supports CAN Flexible data rate (CAN FD) transmission up to 5 Mbit/s The TLE9252V also has an integrated over temperature detection to protect the TLE9252V against thermal overstress of the transmitter.
The CAN FD Click supports five different Modes of operation. Each mode with specific characteristics in terms of quiescent current, data transmission or failure diagnostic. For the mode selection the digital input pins EN and STB are used.
- Normal-operating mode – all functions of the TLE9252V are available and the device is fully functional.
- Receive-only mode – the transmitter is disabled and the receiver is enabled.
- Stand-by Mode is a low power mode of the TLE9252V and the transmitter and the receiver are disabled.
- Sleep Mode – is a low power mode of the TLE9252V. In Sleep Mode the current consumption is reduced to a minimum while the device is still able to detect a Wake-Up Pattern on WKE pin.
- Go-to-Sleep command- is a transition mode allowing external circuitry like a microcontroller to prepare the ECU to go to Sleep Mode.
The HS CAN transceiver TLE9252V includes a receiver and a transmitter unit, allowing the transceiver to send data to the bus medium and monitors the data from the bus medium at the same time by suing two wires. The TLE9252V converts the serial data stream which is available on the transmit data input TxD, into a differential output signal on the CAN bus, provided by the CANH and CANL pins.
Given all the features its components offer, the CAN FD Click is best used for for infotainment applications, cluster modules, radar applications and HVAC. The onboard SMD jumper labeled as the VIO SEL is used to select which voltage rail will be used as the logic voltage level. It offers voltage selection between 3.3V and 5V so that the click board™ can be interfaced with both the 3.3V and 5V capable MCUs. The two UART wires (RX and TX) can also be connected directly through two pins on the left edge of the board. With R5 and R6 jumpers populated alows you to use click board with standard 12V battery connected on battery pads at right side of board.
Specifications
Type
CAN,CAN FD
Applications
Infotainment applications, cluster modules, radar applications and HVAC
On-board modules
TLE9252V, a transceiver designed for HS CAN networks up to 5 Mbit/s in automotive and industrial applications from Infineon
Key Features
Fail safe features like TxD time-out, RxD Recessive Clamping and Overtemperature shut-down, Very low electromagnetic emission (EME), Dual Power Supply Solution or Undervoltage detection
Interface
GPIO,UART
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on CAN FD Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
PWR | PWR | – | Power LED Indicator |
SW | SW | Lower | Bus Wake-Up Switch: Upper position: Active Wake-Up, Lower position: Disabled Wake-Up |
VIO SEL | VIO SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
R5, R6 | R5, R6 | Unpopulated | Jumpers for battery usage |
J2 | RX/TX | Unpopulated | UART RX/TX Pads |
Software Support
We provide a library for the CAN FD Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control CAN FD click board. Library performs a standard UART communication.
Key functions:
canfd_byte_ready( )
– Write Single Byteuint8_t canfd_read_byte( )
– Read Single Byte.void canfd_set_operating_mode ( uint8_t op_mode )
– Set operating mode function.
Examples description
The application is composed of three sections :
- System Initialization – Initializes UART, sets ERR ( INT ) pin as input and STB ( RST ) and EN ( CS ) pins as output, begins to write a log.
- Application Initialization – Initialization driver enables – UART, performs an app mode, also write log.
- Application Task – (code snippet) This is an example that demonstrates the use of the CAN FD click board. This application task writes message data via UART. In the second case, checks if new data byte have received in RX buffer ( ready for reading ), and if ready than reads one byte from RX buffer. Results are being sent to the Usart Terminal where you can track their changes.
void application_task ( ) { char tmp; uint8_t drdy_flag; if ( app_mode == APP_MODE_RECEIVER ) { // RECEIVER - UART polling drdy_flag = canfd_byte_ready( ); if ( 1 == drdy_flag ) { tmp = canfd_read_byte( ); mikrobus_logWrite( &tmp, _LOG_BYTE ); } } else { // TRANSMITER - TX each 2 sec mikrobus_logWrite( " TX data: ", _LOG_TEXT ); Delay_ms( 1000 ); for ( tmp = 0; tmp < 9; tmp++ ) { canfd_write_byte( demo_message_data[ tmp ] ); mikrobus_logWrite( &demo_message_data[ tmp ], _LOG_BYTE ); Delay_ms( 200 ); } mikrobus_logWrite( "------------------", _LOG_LINE ); Delay_ms( 2000 ); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.