资源简介
1、该程序为STM32 CAN 双机通讯实例,接收数据时通过中断程序进行接收的。
2、Node的主芯片为STM32F103ZET,node2的芯片为STM32F103C8. 双机均工作在正常模式下。为了能够完整的完成双机通讯,还需要配备CAN接收器。本例程中采用的是TJA1050 CAN控制芯片.可从网上购买,约6元左右。
3、在运行过程中,只能某一STM32发送(程序中没有设置数据重发,因此在两个节点的主程序中都有发送程序的话,会进行总线总裁,失败方无法再次发送发送数据)。大家可以再我的基础上进行修改。
4、该程序没有设置错误处理程序,大家可以进行完善

代码片段和文件信息
/**
******************************************************************************
* @file system_stm32f10x.c
* @author MCD Application Team
* @version V3.5.0
* @date 11-March-2011
* @brief CMSIS Cortex-M3 Device Peripheral Access layer System Source File.
*
* 1. This file provides two functions and one global variable to be called from
* user application:
* - SystemInit(): Setups the system clock (System clock source PLL Multiplier
* factors AHB/APBx prescalers and Flash settings).
* This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the “startup_stm32f10x_xx.s“ file.
*
* - SystemCoreClock variable: Contains the core clock (HCLK) it can be used
* by the user application to setup the SysTick
* timer or configure other parameters.
*
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
* be called whenever the core clock is changed
* during program execution.
*
* 2. After each device reset the HSI (8 MHz) is used as system clock source.
* Then SystemInit() function is called in “startup_stm32f10x_xx.s“ file to
* configure the system clock before to branch to main program.
*
* 3. If the system clock source selected by user fails to startup the SystemInit()
* function will do nothing and HSI still used as system clock source. User can
* add some code to deal with this issue inside the SetSysClock() function.
*
* 4. The default value of HSE crystal is set to 8 MHz (or 25 MHz depedning on
* the product used) refer to “HSE_VALUE“ define in “stm32f10x.h“ file.
* When HSE is used as system clock source directly or through PLL and you
* are using different crystal you have to adapt the HSE value to your own
* configuration.
*
******************************************************************************
* @attention
*
* THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* © COPYRIGHT 2011 STMicroelectronics
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/
/** @addtogroup stm32f10x_system
* @{
*
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-05-17 18:20 03_CAN 双机通讯模式\
目录 0 2015-05-17 18:20 03_CAN 双机通讯模式\01_Node1\
目录 0 2015-05-17 18:20 03_CAN 双机通讯模式\01_Node1\boot\
目录 0 2015-05-17 18:20 03_CAN 双机通讯模式\01_Node1\boot\CM3\
文件 17273 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\CM3\core_cm3.c
文件 85714 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\CM3\core_cm3.h
文件 10308 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\cortexm3_macro.s
目录 0 2015-05-17 18:20 03_CAN 双机通讯模式\01_Node1\boot\startup\
文件 15766 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\startup\startup_stm32f10x_cl.s
文件 15503 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\startup\startup_stm32f10x_hd.s
文件 15692 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\startup\startup_stm32f10x_hd_vl.s
文件 12376 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\startup\startup_stm32f10x_ld.s
文件 13656 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\startup\startup_stm32f10x_ld_vl.s
文件 12765 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\startup\startup_stm32f10x_md.s
文件 14073 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\startup\startup_stm32f10x_md_vl.s
文件 15955 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\startup\startup_stm32f10x_xl.s
文件 633963 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\stm32f10x.h
文件 43513 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\stm32f10x_cl.h
文件 3239 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\stm32f10x_conf.h
文件 12871 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\stm32f10x_vector.s
文件 36557 2015-04-15 15:08 03_CAN 双机通讯模式\01_Node1\boot\system_stm32f10x.c
文件 2085 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\system_stm32f10x.h
文件 1672 2015-03-28 23:32 03_CAN 双机通讯模式\01_Node1\boot\system_stm32f10x_cl.h
文件 3741 2015-04-29 16:55 03_CAN 双机通讯模式\01_Node1\CAN.build_log.htm
文件 137961 2015-05-12 23:39 03_CAN 双机通讯模式\01_Node1\CAN.uvgui.BobYang
文件 138085 2015-05-12 16:11 03_CAN 双机通讯模式\01_Node1\CAN.uvgui_BobYang.bak
文件 19235 2015-05-12 23:39 03_CAN 双机通讯模式\01_Node1\CAN.uvopt
文件 17699 2015-05-07 15:35 03_CAN 双机通讯模式\01_Node1\CAN.uvproj
文件 19874 2015-05-17 18:17 03_CAN 双机通讯模式\01_Node1\CAN_CAN.dep
文件 19243 2015-05-12 16:11 03_CAN 双机通讯模式\01_Node1\CAN_uvopt.bak
文件 17735 2015-05-06 22:51 03_CAN 双机通讯模式\01_Node1\CAN_uvproj.bak
............此处省略156个文件信息
相关资源
- 基于stm32f103ve的程序——跑马灯实验
- 基于STM32RCT6的步进电机驱动程序
- stm32f407上的两个can发送和接收例程
- delphi 串口通讯
- STM32 led 时钟
- STM32 2.4G通信例程
- Omron ETN21模块进行modbustcp通讯
- CANopen使用手册_埃斯顿
- CanuMobiSim
- 直流无刷电机方波驱动 stm32 例程代码
- STM32中文资料
- STM32蓝牙和串口程序
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- stm32f030 IAP Demo(原创)
- modbus通讯协议详解
- 28335CAN调试程序
- STM32基于rt_thread操作系统的SDHC卡文件
- NRF24L01实现51与STM32双向通讯
- STM32F103 串口程序(完整版)
- stm32 ds18b20 温度传感器 测试通过
- stm32官方例程
- STM32F103定时器中断程序
- 数据库VFP课程设计
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- 单片机与PC机串口通讯仿真
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- STM32定时器使用入门。看了这个程序会
- UART转CAN或LIN的工具(Uart2any)和文档
评论
共有 条评论