⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 stm32F103库文件
💻 TXT
字号:
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
* File Name          : readme.txt
* Author             : MCD Application Team
* Version            : V1.0
* Date               : 10/08/2007
* Description        : Description of the CAN Example.
********************************************************************************
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/
本例展示了如何使用STM32的BxCAN模块来收发数据。在本例中,BxCAN模块工作在loopback模式下,即从接收端接收从发射段发出的数据,实现自发自收。运行程序以后,首先,模块将以100Kbit/s的波特率传输一帧标准数据。等待传输完成以后,在接受段接收并核对这帧数据,根据结果判断传输正确与否并亮起相应的LED。

随后,模块将以500Kbit/s的波特率传输一帧扩展数据,这次,接受端在收到收据以后,将产生一个中断,在中断中核对这帧数据。也根据结果判断传输正确与否并亮起相应的LED。

对于EKSTM32F,由于4个LED分别被连接在管脚PC.04 – PC.07,而在STM32-EVALB上,4个LED连接在PC.06 – PC.09。对上述程序只需要作相应的改动即可。

运行程序,发现版上LD5和LD4亮起,这标志着2次传输都成功。

Example description
===================
This example provides a description of how to set a communication with the bxCAN
in loopback mode.

The CAN cell first performs a transmission and a reception of a standard data
frame by polling at 100 Kbits/s. The received frame is checked and some LEDs light
up to indicate whether the communication was successful. Then, an extended data
frame is transmitted at 500 Kbits/s. Reception is done in the interrupt handler
when the message becomes pending in the FIFO. Finally, the LEDs indicate if both
transmission and reception have been successful.


Directory contents
==================
stm32f10x_conf.h  Library Configuration file
stm32f10x_it.c    Interrupt handlers
stm32f10x_it.h    Interrupt handlers header file
main.c            Main program


Hardware environment
====================
 - This examples runs on STM3210B-EVAL board


How to use it
=============
In order to make the program work, you must do the following :
- Create a project and setup all your toolchain's start-up files
- Compile the directory content files and required Library files :
  + stm32f10x_lib.c
  + stm32f10x_can.c
  + stm32f10x_rcc.c
  + stm32f10x_gpio.c
  + stm32f10x_nvic.c
  + stm32f10x_flash.c
    
- Link all compiled files and load your image into either RAM or FLASH
- Run the example

******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE******

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -