About bxCAN of STM32

Publisher:BlissfulWhisperLatest update time:2018-06-05 Source: eefocusKeywords:STM32  bxCAN Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The CAN of STM32 is called bxCAN (Basic Extended CAN), which supports CAN protocol 2.0A and 2.0B. The basic type of STM32 has only one master CAN, and the interconnected type has one master CAN and one slave CAN.

1. About CAN_RX and CAN_TX

CAN communication is divided into CNA controller and CAN transceiver. The signals from CAN controller are CAN_RX and CAN_TX. Signal and level conversion are realized by CAN transceiver. You can see it by looking at the schematic diagram of CAN transceiver such as TJA1050.


2. STM32's bxCAN is divided into master/slave

●CAN1: is the master bxCAN, it manages the communication between the slave bxCAN and the 512-byte SRAM memory
●CAN2: is the slave bxCAN, it cannot directly access the SRAM memory

● The two bxCAN modules share 512 bytes of SRAM memory

Note: In medium and large capacity products, USB and CAN share a dedicated 512-byte SRAM memory for data transmission and reception, so USB and CAN cannot be used at the same time (the shared SRAM is accessed exclusively by the USB and CAN modules). USB and CAN can be used in an application at the same time but not at the same time.


STM32 has two bxCAN peripherals, namely CAN1 and CAN2. These two CAN peripherals each have their own send mailbox, receive FIFO0 and FIFO1. However, in addition to this, CAN also has a receive filter, while CAN2 does not. However, in actual work, only one receive filter is needed, not both CANs. Therefore, CAN2 can completely share the receive filter of CAN1 (this is the 512-byte SRAM shared by CAN1 and CAN2), but it is indirectly accessed through the memory read-write controller of CAN1 inside the chip. From the structure of CAN1 and CAN2, it is not surprising to regard CAN1 as the main CAN and CAN2 as the slave CAN. Except for the name, there is no difference in use and function. These are just the design of bxCAN inside the chip, and bxCAN is completely multi-master mode externally.


Keywords:STM32  bxCAN Reference address:About bxCAN of STM32

Previous article:STM32F1xxx memory and bus architecture
Next article:STM32 architecture

Recommended ReadingLatest update time:2024-11-16 23:59

STM32 development board example explanation 1: Use IAR 5.3 to create a project
       Learning STM32, getting started is very important, and the first one you build yourself is also very important. Getting started as soon as possible and building up confidence in learning will be of great help to subsequent learning. This article will describe how to build a project on IAR and start your first ex
[Microcontroller]
An easy-to-understand entry-level example of I2C for stm32
I bought a core board, which means I have my own STM32 board, so I also learned about I2C (because it is 24C02, hehe, it is more familiar). At the beginning, I wrote a read and write program according to the routine in the reference book, but there was no data output from the serial port when I downloaded the program
[Microcontroller]
An easy-to-understand entry-level example of I2C for stm32
Difference between stm32f2xx and stm32f10x in timer initialization for quadrature encoder applications
Notice: If the stm32f2xx series, the code in the URL above needs to be modified appropriately. The following are the key points: For the stm32f2xx series, when initializing GPIO during debugging, remember to select the GPIO_Mode_AF mode, that is, port multiplexing. Then, port mapping needs to be done, that is, c
[Microcontroller]
Configuration 1602 program based on STM32
Note: PD_0-7 is used for PO port (LCD data port of MCU board), PA0_2; They have been configured as registers in the function. Note that when reconfiguring PD These ports should not be configured; PD and PA need to be enabled in the main function. Header function: #include "1602.h" Function:
[Microcontroller]
STM32 study notes - real-time clock RTC
  //Through this routine, you can learn how to configure RTC and read count values, as well as how to convert numerical formats  . If you want to control it well, you need to read more materials and programs.             #include  "stm32f10x_lib.h"       vu32  TimeDisplay  =  0; ErrorStatus 
[Microcontroller]
STM32 DMA normal mode waits for transfer to complete and starts next transfer
Select the normal mode of DMA, that is, DMA transfers only once. If you want to transfer again after the transfer is completed, you need to restart DMA: DMA_Cmd(DMA1_Channel6,DISABLE);  Reset source address  Reset destination address  Reset transfer quantity  DMA_Cmd(DMA1_Channel6,ENABLE);  Therefore, it is recommen
[Microcontroller]
STM32 controls stepper motor in timer
When writing a WEB program, I found that if I added stepper motor control, there would be problems. The reason is that if the motor control is placed in the uip loop, because controlling the motor involves time issues. So it must be solved, and the method I thought of is the idea of ​​multitasking. Put the processing o
[Microcontroller]
Design and implementation of smart home system based on STM32
Smart home (also known as smart house) is a safe, efficient, comfortable, convenient and environmentally friendly living environment that takes residence as a platform, combines architecture, network communication, information appliances, equipment automation, and integrates systems, structures, services and managemen
[Microcontroller]
Design and implementation of smart home system based on STM32
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号