资源简介
STM32F207 串口例子
串口1,2为DMA发送与接收
串口3,4没有使用DMA。
工程为KEILC。4个串口发送接收都在硬件板是测试过的。
需要注意的是我的硬件板的晶振是25M,如果你的晶振不一样,需要在system_stm32f2xx.c 文件中修改
#ifndef RMII_MODE
/* System clock frequency configured for 120 MHz ****************************/
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
#define PLL_M 25
代码片段和文件信息
/**************************************************************************//**
* @file core_cm3.c
* @brief CMSIS Cortex-M3 Core Peripheral Access layer Source File
* @version V1.30
* @date 30. October 2009
*
* @note
* Copyright (C) 2009 ARM Limited. All rights reserved.
*
* @par
* ARM Limited (ARM) is supplying this software for use with Cortex-M
* processor based microcontrollers. This file can be freely distributed
* within development tools that are supporting such ARM based processors.
*
* @par
* THIS SOFTWARE IS PROVIDED “AS IS“. NO WARRANTIES WHETHER EXPRESS IMPLIED
* OR STATUTORY INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
* ARM SHALL NOT IN ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL INCIDENTAL OR
* CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
*
******************************************************************************/
#include
/* define compiler specific symbols */
#if defined ( __CC_ARM )
#define __ASM __asm /*!< asm keyword for ARM Compiler */
#define __INLINE __inline /*!< inline keyword for ARM Compiler */
#elif defined ( __ICCARM__ )
#define __ASM __asm /*!< asm keyword for IAR Compiler */
#define __INLINE inline /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */
#elif defined ( __GNUC__ )
#define __ASM __asm /*!< asm keyword for GNU Compiler */
#define __INLINE inline /*!< inline keyword for GNU Compiler */
#elif defined ( __TASKING__ )
#define __ASM __asm /*!< asm keyword for TASKING Compiler */
#define __INLINE inline /*!< inline keyword for TASKING Compiler */
#endif
/* ################### Compiler specific Intrinsics ########################### */
#if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
/* ARM armcc specific functions */
/**
* @brief Return the Process Stack Pointer
*
* @return ProcessStackPointer
*
* Return the actual process stack pointer
*/
__ASM uint32_t __get_PSP(void)
{
mrs r0 psp
bx lr
}
/**
* @brief Set the Process Stack Pointer
*
* @param topOfProcStack Process Stack Pointer
*
* Assign the value ProcessStackPointer to the MSP
* (process stack pointer) Cortex processor register
*/
__ASM void __set_PSP(uint32_t topOfProcStack)
{
msr psp r0
bx lr
}
/**
* @brief Return the Main Stack Pointer
*
* @return Main Stack Pointer
*
* Return the curren
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6788 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\misc.h
文件 32413 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_adc.h
文件 27182 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_can.h
文件 3597 2011-11-27 02:40 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_conf.h
文件 2280 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_crc.h
文件 12524 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_cryp.h
文件 14810 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_dac.h
文件 4160 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_dbgmcu.h
文件 12841 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_dcmi.h
文件 28746 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_dma.h
文件 7876 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_exti.h
文件 14459 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_flash.h
文件 27040 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_fsmc.h
文件 17476 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_gpio.h
文件 8948 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_hash.h
文件 31452 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_i2c.h
文件 2047 2011-11-27 02:40 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_it.h
文件 4187 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_iwdg.h
文件 5364 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_pwr.h
文件 24673 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_rcc.h
文件 3822 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_rng.h
文件 25396 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_rtc.h
文件 22641 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_sdio.h
文件 19848 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_spi.h
文件 7092 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_syscfg.h
文件 51553 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_tim.h
文件 17248 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_usart.h
文件 3406 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\inc\stm32f2xx_wwdg.h
文件 11307 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\src\misc.c
文件 68269 2011-11-27 02:41 STM32F2xx_StdPeriph_Driver\src\stm32f2xx_adc.c
............此处省略71个文件信息
- 上一篇:手机读写SIM卡底层驱动
- 下一篇:创建进程时,指定父进程
评论
共有 条评论