Experiment 3

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 4

Experiment 3: Full Duplex Communication

• Use STM32F405RGxx development Board


• Configure CAN1, CAN2 both as Master
• Send/Receive message from CAN1 to CAN 2 in full
duplex.
• Display received message in 2x16LCD
Algorithm:
Step 1: Create a new project in STM32CubeIDE.
Step 2: Refer the schematic and configure the CAN 1, CAN 2 module in IOC file.
i). For CAN 1,configure Strobe pin,Tx,Rx pins.
ii). For CAN 2,configure Strobe pin,Tx,Rx pins.
Step 3: set the baud rate for both the CAN which is available in parameter settings.
Step 4: Configure the LCD enabling pins(RS,EN,D0-D7)
Step 5: Generate the Code
Step 6: Define the TX header & Rx header variable.
Step 7: Make the CAN 1 & CAN 2 strobe pin as LOW.
Step 8: Load the values for structure elements in TX header
Step 9: Configure the Filter configuration & activate it by using API
Step 10: Start both the CAN module by using API.
Step 11: Transmit the data from CAN 1 module by using CAN Tx API.
Step 12: Receive the data in CAN 2 module by using CAN Rx API.
Step 13: At the same time ,Transmit the data from CAN 2 module by using CAN Tx API.
Step 14: Receive the data in CAN 1 module by using CAN Rx API.
Step 15: Connect the CAN 1 & CAN 2 module by using CAN bus..
Step 16: Display the CAN 1Received data in the first line of LCD.
Step 17: Display the CAN 2Received data in the second line of LCD.
OUTPUT:

You might also like