资源简介
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个文件信息
相关资源
- 北洋激光雷达通讯协议
- STM32F4测频率、占空比工程
- stm32F407ADC电压采集串口输出程序
- DJI M100 STM32
- STM32F103多ADC多通道采样
- STM32 OLED 菜单显示汉字
- wwwscan不错的网站目录扫描
- STM32的硬件SPI驱动的ILI9341代码
- SJA1000Peli模式下的CAN驱动程序
- STM32F103VET6原理图和pcb.rar
- STM32F4 I2C/IIC 驱动程序
- STM32F4位带操作头文件 直接可用
- STM32F103封装库
- canopen源码
- stm32 MDK5.14安装手册
- stm32颜色识别追踪算法 腐蚀算法
- 通讯录管理
- SlickEdit 用MDK工具编译STM32的例程
- 三维力控与MODBUS仪表通讯说明及例程
- uIP STM32 TCP Echo
- STM32 TFT液晶驱动与JPEG解码图象显示
- labview与台达plc通讯Modbus RTU
- stm32 4*4矩阵键盘
- STM32 步进电机程序 包括加减速 位置模
- STM32F107实现DP83848-UDP-TCP通信程序
- 基于STM32的无位置传感器无刷直流电机
- STM32系列串口烧写工具
- stm32驱动舵机
- WS2812驱动程序SPI+DMA
- 格力空调红外通讯协议
评论
共有 条评论