Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 

74 рядки
2.0 KiB

  1. #ifndef _SYS_H
  2. #define _SYS_H
  3. #include "stm32f7xx.h"
  4. #include "core_cm7.h"
  5. #include "stm32f7xx_hal.h"
  6. //////////////////////////////////////////////////////////////////////////////////
  7. //本程序只供学习使用,未经作者许可,不得用于其它任何用途
  8. //ALIENTEK STM32F7开发板
  9. //系统时钟初始化
  10. //正点原子@ALIENTEK
  11. //技术论坛:www.openedv.com
  12. //创建日期:2015/6/10
  13. //版本:V1.0
  14. //版权所有,盗版必究。
  15. //Copyright(C) 广州市星翼电子科技有限公司 2014-2024
  16. //All rights reserved
  17. //********************************************************************************
  18. //修改说明
  19. //无
  20. //////////////////////////////////////////////////////////////////////////////////
  21. //0,不支持os
  22. //1,支持os
  23. #define SYSTEM_SUPPORT_OS 1 //定义系统文件夹是否支持OS
  24. ///////////////////////////////////////////////////////////////////////////////////
  25. //定义一些常用的数据类型短关键字
  26. typedef int32_t s32;
  27. typedef int16_t s16;
  28. typedef int8_t s8;
  29. typedef const int32_t sc32;
  30. typedef const int16_t sc16;
  31. typedef const int8_t sc8;
  32. typedef __IO int32_t vs32;
  33. typedef __IO int16_t vs16;
  34. typedef __IO int8_t vs8;
  35. typedef __I int32_t vsc32;
  36. typedef __I int16_t vsc16;
  37. typedef __I int8_t vsc8;
  38. typedef uint32_t u32;
  39. typedef uint16_t u16;
  40. typedef uint8_t u8;
  41. typedef const uint32_t uc32;
  42. typedef const uint16_t uc16;
  43. typedef const uint8_t uc8;
  44. typedef __IO uint32_t vu32;
  45. typedef __IO uint16_t vu16;
  46. typedef __IO uint8_t vu8;
  47. typedef __I uint32_t vuc32;
  48. typedef __I uint16_t vuc16;
  49. typedef __I uint8_t vuc8;
  50. #define ON 1
  51. #define OFF 0
  52. #define Write_Through() (*(__IO uint32_t*)0XE000EF9C=1UL<<2) //Cache透写模式
  53. void Cache_Enable(void); //使能STM32F7的L1-Cahce
  54. void Stm32_Clock_Init(u32 plln,u32 pllm,u32 pllp,u32 pllq); //配置系统时钟
  55. u8 Get_ICahceSta(void);//判断I_Cache是否打开
  56. u8 Get_DCahceSta(void);//判断I_Dache是否打开
  57. //以下为汇编函数
  58. void WFI_SET(void); //执行WFI指令
  59. void INTX_DISABLE(void);//关闭所有中断
  60. void INTX_ENABLE(void); //开启所有中断
  61. void MSR_MSP(u32 addr); //设置堆栈地址
  62. #endif