stm32串口代码


板上的8 个按键分别分别代表数字1-8,每按下一个按键将结果通过串口发 送到PC 机上显示; 使用两个定时器模块,分别定时为1ms 和100ms 产生中断,使用它们分别 产生1s 的定时时间,将时间分别显示到数码管上; 外接PS/2 小键盘,将按键的值通过串口显示到PC 机上
资源截图
代码片段和文件信息
//*
//*********************************************************************************************************
//*
//*                                                 LOGO
//*
//*
//* 文 件 名 : stm3210x_vector.c
//*
//* 文件描述 : STM32系统向量表
//*
//* 作    者 : 
//* 版    本 : 
//* 编 译 器 : IAR EWARM 5.20
//*********************************************************************************************************
//*

#include “stm32f10x_lib.h“
#include “stm32f10x_it.h“

typedef void( *intfunc )( void );
typedef union { intfunc __fun; void * __ptr; } intvec_elem;

#pragma language=extended
#pragma segment=“CSTACK“

void __iar_program_start( void );

#pragma location = “.intvec“
// STM32F10x向量表
const intvec_elem __vector_table[] =
{
  { .__ptr = __sfe( “CSTACK“ ) }           // 00 堆栈
  __iar_program_start                      // 01 复位
  NMIException                             // 02
  HardFaultException                       // 03 
  MemManageException                       // 04
  BusFaultException                        // 05
  UsageFaultException                      // 06
  0 0 0 0                               // 07 08 09 10保留
  SVCHandler                               // 11
  DebugMonitor                             // 12
  0                                        // 13 保留
  OS_CPU_PendSVHandler                     // 14 PendSV 用于系统调度
  OS_CPU_SysTickHandler                    // 15 系统Tick
  WWDG_IRQHandler                          // 16
  PVD_IRQHandler                           // 17
  TAMPER_IRQHandler                        // 18
  RTC_IRQHandler                           // 19
  FLASH_IRQHandler                         // 20
  RCC_IRQHandler                           // 21
  EXTI0_IRQHandler                         // 22
  EXTI1_IRQHandler                         // 23
  EXTI2_IRQHandler                         // 24
  EXTI3_IRQHandler                         // 25
  EXTI4_IRQHandler                         // 26
  DMA1_Channel1_IRQHandler                 // 27
  DMA1_Channel2_IRQHandler                 // 28
  DMA1_Channel3_IRQHandler                 // 29
  DMA1_Channel4_IRQHandler                 // 30
  DMA1_Channel5_IRQHandler                 // 31
  DMA1_Channel6_IRQHandler                 // 32
  DMA1_Channel7_IRQHandler                 // 33
  ADC1_2_IRQHandler                        // 34
  USB_HP_CAN_TX_IRQHandler                 // 35
  USB_LP_CAN_RX0_IRQHandler                // 36
  CAN_RX1_IRQHandler                       // 37
  CAN_SCE_IRQHandler                       // 38
  EXTI9_5_IRQHandler                       // 39
  TIM1_BRK_IRQHandler                      // 40
  TIM1_UP_IRQHandler                       // 41
  TIM1_TRG_COM_IRQHandler                  // 42
  TIM1_CC_IRQHandler                       // 43
  TIM2_IRQHandler                          // 44
  TIM3_IRQHandler                          // 45
  TIM

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      78468  2018-09-11 10:08  SUN1projectBackup of gprs.ewp

     文件          3  2018-09-11 10:10  SUN1projectBuildLog.log

     文件       7020  2018-09-13 10:10  SUN1projectDebugExegprs.bin

     文件     123952  2018-09-13 10:10  SUN1projectDebugExegprs.out

     文件      25139  2018-09-13 10:10  SUN1projectDebugObjBoardInit.o

     文件     970981  2018-09-13 10:10  SUN1projectDebugObjBoardInit.pbi

     文件      11859  2018-09-13 10:10  SUN1projectDebugObjBoardInit.pbi.xcl

     文件       2693  2018-09-13 10:10  SUN1projectDebugObjcortexm3_macro.o

     文件      18156  2011-01-13 21:03  SUN1projectDebugObjgprs.o

     文件          0  2018-09-13 10:10  SUN1projectDebugObjgprs.pbd

     文件          0  2018-09-13 10:07  SUN1projectDebugObjgprs.pbd.browse

     文件        552  2018-09-13 10:10  SUN1projectDebugObjgprs.pbd.linf

     文件          0  2018-09-13 08:39  SUN1projectDebugObjgprs.pbd.tmp

     文件        971  2011-01-22 23:05  SUN1projectDebugObjgprs.pbi

     文件    4039783  2018-09-13 08:39  SUN1projectDebugObjgprs.pbw

     文件      19724  2011-04-20 15:39  SUN1projectDebugObjHex.o

     文件      32216  2011-02-13 20:48  SUN1projectDebugObjI2C.o

     文件       8576  2011-04-20 15:44  SUN1projectDebugObjled.o

     文件      23648  2018-09-13 10:10  SUN1projectDebugObjmain.o

     文件     957025  2018-09-13 10:10  SUN1projectDebugObjmain.pbi

     文件      11854  2018-09-13 10:10  SUN1projectDebugObjmain.pbi.xcl

     文件      34760  2011-01-13 21:03  SUN1projectDebugObjpdu.o

     文件        969  2011-01-22 23:06  SUN1projectDebugObjpdu.pbi

     文件      11534  2018-09-13 10:10  SUN1projectDebugObjPS2.o

     文件     959034  2018-09-13 10:10  SUN1projectDebugObjPS2.pbi

     文件      11853  2018-09-13 10:10  SUN1projectDebugObjPS2.pbi.xcl

     文件     109648  2018-09-13 10:10  SUN1projectDebugObjstm32f10x_it.o

     文件     970925  2018-09-13 10:10  SUN1projectDebugObjstm32f10x_it.pbi

     文件      11862  2018-09-13 10:10  SUN1projectDebugObjstm32f10x_it.pbi.xcl

     文件       7678  2018-09-13 10:10  SUN1projectDebugObjstm32f10x_vector.o

............此处省略95个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)