资源简介
使用STM32 HAL库实现的MODBUS RTU协议的从机,主控芯片使用STM32F103RBT6。
代码片段和文件信息
/******************************************************************************
* @file main_s.c
* @brief Code template for secure main function
* @version V1.1.1
* @date 10. January 2018
******************************************************************************/
/*
* Copyright (c) 2013-2018 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an AS IS BASIS WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Use CMSE intrinsics */
#include
#include “RTE_Components.h“
#include CMSIS_device_header
/* TZ_START_NS: Start address of non-secure application */
#ifndef TZ_START_NS
#define TZ_START_NS (0x200000U)
#endif
/* typedef for non-secure callback functions */
typedef void (*funcptr_void) (void) __attribute__((cmse_nonsecure_call));
/* Secure main() */
int main(void) {
funcptr_void NonSecure_ResetHandler;
/* Add user setup code for secure part here*/
/* Set non-secure main stack (MSP_NS) */
__TZ_set_MSP_NS(*((uint32_t *)(TZ_START_NS)));
/* Get non-secure reset handler */
NonSecure_ResetHandler = (funcptr_void)(*((uint32_t *)((TZ_START_NS) + 4U)));
/* Start non-secure state software application */
NonSecure_ResetHandler();
/* Non-secure software does not return this code is not executed */
while (1) {
__NOP();
}
}
- 上一篇:FINALDATA 3.0企业版
- 下一篇:Windchill常用开发大全
相关资源
- STM32的DSP库
- stm32 MPU6050四元数姿态结算程序
- 3,ALIENTEK MiniSTM32开发板原理图
- 基于STM32C8T6的最小系统的工程模板文
- STM32F10x舵机控制
- 室内空气质量监测控制系统
- 四位数码管STM32计时程序
- stm32F107 CAN通讯的程序
- 基于stm32的交流异步电机控制系统的设
- stm32f103c8t6模数转换AD例程
- STM32CubeMx开发
- proteus8.6仿真stm32f103
- 基于STM32F103的LCD1602的IIC显示程序
- 基于STM32的AD采集与SD卡数据存储
- STM32蓝牙工程源码,亲测,以实现手机
- 履带小车STM32F401ZG
- HC-SR04超声波模块+STM32F103
- stm32+测速+调速2019.5.30.rar
- 基于STM32F407(1HZ~600KHZ)频率,占空比
- STM32接上位机程序
- STM32简易示波器
- 51与STM32的232串口通信
- 基于PE4302的步进衰减以及对应的51程序
- stm32 rs485 modbus协议
- 基于STM32的红外遥控程序.zip
- DMA+多路ADC+定时器+均值滤波.zip
- stm32f103IIC驱动LCD1602
- max30102心率传感器stm32c8t6+0.96oled显示
- stm32 adc例程
- STM32 通过按键调PWM
评论
共有 条评论