Our high-speed CAN FD transceiver brings reliability and speed together, setting new standards in automotive communication
A
A
Hardware Overview
How does it work?
CAN FD 5 Click is based on the UJA1162A, a ‘self-supplied’ high-speed (HS) CAN transceiver integrating an ISO 11898-2:2016 and SAE J2284-1 to SAE J2284-5 compliant CAN transceiver with Sleep Mode from NXP Semiconductors. The UJA1162A provides reliable communication at data rates up to 5 Mbit/s in the CAN FD HS phase and can be operated in a very low-current Sleep mode with local and bus wake-up capability. Various fail-safe and diagnostic features offer enhanced system reliability and advanced power management. The HS CAN transceiver UJA1162A includes a receiver and a transmitter unit, allowing the transceiver to send data to the bus medium and monitor the data from the bus medium simultaneously. The UJA1162A supports five operating modes: Normal, Standby, Sleep, Overtemp, and Off. Each mode has specific characteristics regarding quiescent current, data transmission, or failure diagnostic. When the transceiver is in Sleep Mode, the
pin routed to the external regulator TLS850B0TBV33 positioned on the back of the Click board™, will be turned off, reducing the power consumption of the external elements. Outputs of those LDOs are routed through the SMD jumpers that can be populated so that the LDOs can be used to power up the mikroBUS™ 3.3V and 5V power rails. However, it should be noted that MikroE does not advise powering up their systems this way - that is why these jumpers are left unpopulated by default. The CAN FD 5 Click communicates with MCU using the UART interface with the default baud rate of 9600 bps for the data transfer, while the GPIO pins on this Click board™ are used for Sleep Mode control, local wake-up, and an interrupt for CAN transceiver status. CS pin of the mikroBUS™ socket labeled as the SLP can be used for switching between Normal and Standby/Sleep Mode by toggling this pin. It also has a Local
Wake-Up function routed to the PWM pin on the mikroBUS™, labeled as WAK, which will cause the transition of UJA1162A from Standby/Sleep Mode into Normal Mode. Alongside these pins, this Click board™ possesses an interrupt pin labeled as CTS, which indicates to MCU that the transceiver is fully enabled and data can be transmitted and received via the UART TX/RX pins. It is also possible for the user to connect the TX/RX signals of UART communication directly through the UART External header on the left edge of the board. This Click board™ is designed to operate with 3.3V and 5V logic voltage levels that can be selected via VIO SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Features overview
Development board
Clicker 2 for Kinetis is a compact starter development board that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It comes with an onboard 32-bit ARM Cortex-M4F microcontroller, the MK64FN1M0VDC12 from NXP Semiconductors, two mikroBUS™ sockets for Click board™ connectivity, a USB connector, LED indicators, buttons, a JTAG programmer connector, and two 26-pin headers for interfacing with external electronics. Its compact design with clear and easily recognizable silkscreen markings allows you to build gadgets with unique functionalities and
features quickly. Each part of the Clicker 2 for Kinetis development kit contains the components necessary for the most efficient operation of the same board. In addition to the possibility of choosing the Clicker 2 for Kinetis programming method, using a USB HID mikroBootloader or an external mikroProg connector for Kinetis programmer, the Clicker 2 board also includes a clean and regulated power supply module for the development kit. It provides two ways of board-powering; through the USB Micro-B cable, where onboard voltage regulators provide the appropriate voltage levels to each component on the board, or
using a Li-Polymer battery via an onboard battery connector. All communication methods that mikroBUS™ itself supports are on this board, including the well-established mikroBUS™ socket, reset button, and several user-configurable buttons and LED indicators. Clicker 2 for Kinetis is an integral part of the Mikroe ecosystem, allowing you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU

Architecture
ARM Cortex-M4
MCU Memory (KB)
1024
Silicon Vendor
NXP
Pin count
121
RAM (Bytes)
262144
You complete me!
Accessories
DB9 Cable Female-to-Female (2m) cable is essential for establishing dependable serial data connections between devices. With its DB9 female connectors on both ends, this cable enables a seamless link between various equipment, such as computers, routers, switches, and other serial devices. Measuring 2 meters in length, it offers flexibility in arranging your setup without compromising data transmission quality. Crafted with precision, this cable ensures consistent and reliable data exchange, making it suitable for industrial applications, office environments, and home setups. Whether configuring networking equipment, accessing console ports, or utilizing serial peripherals, this cable's durable construction and robust connectors guarantee a stable connection. Simplify your data communication needs with the 2m DB9 female-to-female cable, an efficient solution designed to meet your serial connectivity requirements easily and efficiently.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for CAN FD 5 Click driver.
Key functions:
canfd5_generic_write
- Generic write functioncanfd5_generic_read
- Generic read functioncanfd5_set_normal_operating_mode
- Set normal operating mode function
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* \file
* \brief CanFd5 Click example
*
* # Description
* This is an example that demonstrates the use of the CAN FD 5 click board.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver and enables the click board.
*
* ## Application Task
* Depending on the selected mode, it reads all the received data or sends the desired message
* every 2 seconds.
*
* ## Additional Function
* - canfd5_process ( ) - The general process of collecting the received data.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "canfd5.h"
#include "string.h"
#define PROCESS_RX_BUFFER_SIZE 500
#define TEXT_TO_SEND "MikroE\r\n"
// ------------------------------------------------------------------ VARIABLES
// #define DEMO_APP_RECEIVER
#define DEMO_APP_TRANSMITTER
static canfd5_t canfd5;
static log_t logger;
// ------------------------------------------------------- ADDITIONAL FUNCTIONS
static void canfd5_process ( void )
{
int32_t rsp_size;
char uart_rx_buffer[ PROCESS_RX_BUFFER_SIZE ] = { 0 };
uint8_t check_buf_cnt;
rsp_size = canfd5_generic_read( &canfd5, uart_rx_buffer, PROCESS_RX_BUFFER_SIZE );
if ( rsp_size > 0 )
{
log_printf( &logger, "Received data: " );
for ( check_buf_cnt = 0; check_buf_cnt < rsp_size; check_buf_cnt++ )
{
log_printf( &logger, "%c", uart_rx_buffer[ check_buf_cnt ] );
}
}
Delay_ms( 100 );
}
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
canfd5_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
canfd5_cfg_setup( &cfg );
CANFD5_MAP_MIKROBUS( cfg, MIKROBUS_1 );
canfd5_init( &canfd5, &cfg );
canfd5_set_normal_operating_mode( &canfd5 );
Delay_ms( 100 );
}
void application_task ( void )
{
#ifdef DEMO_APP_RECEIVER
canfd5_process( );
#endif
#ifdef DEMO_APP_TRANSMITTER
canfd5_generic_write( &canfd5, TEXT_TO_SEND, 8 );
log_info( &logger, "--- The message is sent ---" );
Delay_ms( 2000 );
#endif
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END