Merge pull request #270 from yangqings/master
增加Tensorflow Lite Micro组件和行人检测Demo
23
board/NUCLEO_STM32L496ZG/BSP/Hardware/Inc/delay.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _DELAY_H
|
||||
#define _DELAY_H
|
||||
#include <sys.h>
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ѧϰʹ<CFB0>ã<EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><CEBA><EFBFBD>;
|
||||
//ALIENTEK STM32F429<32><39><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//ʹ<><CAB9>SysTick<63><6B><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD>ӳٽ<D3B3><D9BD>й<EFBFBD><D0B9><EFBFBD>(֧<><D6A7>ucosii)
|
||||
//<2F><><EFBFBD><EFBFBD>delay_us,delay_ms
|
||||
//<2F><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>@ALIENTEK
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̳:www.openedv.com
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:2015/6/10
|
||||
//<2F>汾<EFBFBD><E6B1BE>V1.0
|
||||
//<2F><>Ȩ<EFBFBD><C8A8><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>
|
||||
//Copyright(C) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿƼ<D3BF><C6BC><EFBFBD><EFBFBD><EFBFBD>˾ 2014-2024
|
||||
//All rights reserved
|
||||
//********************************************************************************
|
||||
//<2F><EFBFBD>˵<EFBFBD><CBB5>
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void delay_us(uint32_t nus);
|
||||
void delay_ms(uint32_t time_ms);
|
||||
#endif
|
||||
|
70
board/NUCLEO_STM32L496ZG/BSP/Hardware/Inc/lcd_2inch4.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*****************************************************************************
|
||||
* | File : LCD_2IN4_Driver.h
|
||||
* | Author : Waveshare team
|
||||
* | Function : LCD driver
|
||||
* | Info :
|
||||
*----------------
|
||||
* | This version: V1.0
|
||||
* | Date : 2020-07-29
|
||||
* | Info :
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documnetation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
******************************************************************************/
|
||||
#ifndef __LCD_2IN4_DRIVER_H
|
||||
#define __LCD_2IN4_DRIVER_H
|
||||
|
||||
#include "lcd_Config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LCD_2IN4_WIDTH 240 //LCD width
|
||||
#define LCD_2IN4_HEIGHT 320 //LCD height
|
||||
|
||||
|
||||
#define LCD_2IN4_CS_0 DEV_Digital_Write(DEV_CS_PIN, 0)
|
||||
#define LCD_2IN4_CS_1 DEV_Digital_Write(DEV_CS_PIN, 1)
|
||||
|
||||
#define LCD_2IN4_RST_0 DEV_Digital_Write(DEV_RST_PIN,0)
|
||||
#define LCD_2IN4_RST_1 DEV_Digital_Write(DEV_RST_PIN,1)
|
||||
|
||||
#define LCD_2IN4_DC_0 DEV_Digital_Write(DEV_DC_PIN, 0)
|
||||
#define LCD_2IN4_DC_1 DEV_Digital_Write(DEV_DC_PIN, 1)
|
||||
|
||||
|
||||
void LCD_2IN4_Init(void);
|
||||
void LCD_2IN4_Clear(UWORD Color);
|
||||
void LCD_2IN4_Display(UWORD *image,int width, int height);
|
||||
void LCD_2IN4_DrawPaint(UWORD x, UWORD y, UWORD Color);
|
||||
void LCD_2IN4_SetBackLight(UWORD Value);
|
||||
|
||||
void LCD_2IN4_WriteData_Word(UWORD da);
|
||||
void LCD_2IN4_SetCursor(UWORD X, UWORD Y);
|
||||
void LCD_2IN4_SetWindow(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend);
|
||||
void LCD_2IN4_ClearWindow(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend,UWORD color);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
87
board/NUCLEO_STM32L496ZG/BSP/Hardware/Inc/lcd_config.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/*****************************************************************************
|
||||
* | File : DEV_Config.h
|
||||
* | Author : Waveshare team
|
||||
* | Function : Hardware underlying interface
|
||||
* | Info :
|
||||
* Used to shield the underlying layers of each master
|
||||
* and enhance portability
|
||||
*----------------
|
||||
* | This version: V1.0
|
||||
* | Date : 2018-11-22
|
||||
* | Info :
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documnetation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
******************************************************************************/
|
||||
#ifndef _DEV_CONFIG_H_
|
||||
#define _DEV_CONFIG_H_
|
||||
|
||||
#include "stm32l4xx_hal.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "spi.h"
|
||||
#include "tim.h"
|
||||
#include "main.h"
|
||||
|
||||
#define UBYTE uint8_t
|
||||
#define UWORD uint16_t
|
||||
#define UDOUBLE uint32_t
|
||||
|
||||
/**
|
||||
* GPIO config
|
||||
**/
|
||||
#define DC_Pin GPIO_PIN_12
|
||||
#define DC_GPIO_Port GPIOB
|
||||
#define RST_Pin GPIO_PIN_11
|
||||
#define RST_GPIO_Port GPIOA
|
||||
#define CS_Pin GPIO_PIN_12
|
||||
#define CS_GPIO_Port GPIOA
|
||||
|
||||
#define DEV_RST_PIN RST_GPIO_Port,RST_Pin //PA11
|
||||
#define DEV_DC_PIN DC_GPIO_Port,DC_Pin //PB12
|
||||
#define DEV_CS_PIN CS_GPIO_Port,CS_Pin //PA12
|
||||
#define DEV_BL_PIN TIM4->CCR1 //PB6
|
||||
|
||||
/**
|
||||
* GPIO read and write
|
||||
**/
|
||||
#define DEV_Digital_Write(_pin, _value) HAL_GPIO_WritePin(_pin, _value == 0? GPIO_PIN_RESET:GPIO_PIN_SET)
|
||||
#define DEV_Digital_Read(_pin) HAL_GPIO_ReadPin(_pin)
|
||||
|
||||
/**
|
||||
* SPI
|
||||
**/
|
||||
#define DEV_SPI_WRITE(_dat) DEV_SPI_WRite(_dat);
|
||||
|
||||
/**
|
||||
* delay x ms
|
||||
**/
|
||||
#define DEV_Delay_ms(__xms) HAL_Delay(__xms)
|
||||
|
||||
/**
|
||||
* PWM_BL
|
||||
**/
|
||||
|
||||
#define DEV_Set_PWM(_Value) DEV_BL_PIN= _Value
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
void DEV_SPI_WRite(UBYTE _dat);
|
||||
int DEV_Module_Init(void);
|
||||
void DEV_Module_Exit(void);
|
||||
#endif
|
156
board/NUCLEO_STM32L496ZG/BSP/Hardware/Inc/ov2640.h
Normal file
@@ -0,0 +1,156 @@
|
||||
#ifndef _OV2640_H
|
||||
#define _OV2640_H
|
||||
#include "sys.h"
|
||||
#include "sccb.h"
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//本程序只供学习使用,未经作者许可,不得用于其它任何用途
|
||||
//ALIENTEK STM32F407开发板
|
||||
//OV2640 驱动代码
|
||||
//正点原子@ALIENTEK
|
||||
//技术论坛:www.openedv.com
|
||||
//创建日期:2014/5/14
|
||||
//版本:V1.0
|
||||
//版权所有,盗版必究。
|
||||
//Copyright(C) 广州市星翼电子科技有限公司 2014-2024
|
||||
//All rights reserved
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
* picture size
|
||||
*/
|
||||
#define OV2640_PIXEL_WIDTH ((uint16_t)96)
|
||||
#define OV2640_PIXEL_HEIGHT ((uint16_t)96)
|
||||
|
||||
//#define OV2640_PWDN PGout(9) //POWER DOWN控制信号
|
||||
//#define OV2640_RST PGout(15) //复位控制信号
|
||||
void OV2640_PWDN(uint8_t signal);
|
||||
void OV2640_RST(uint8_t signal);
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
#define OV2640_MID 0X7FA2
|
||||
#define OV2640_PID 0X2642
|
||||
|
||||
|
||||
//当选择DSP地址(0XFF=0X00)时,OV2640的DSP寄存器地址映射表
|
||||
#define OV2640_DSP_R_BYPASS 0x05
|
||||
#define OV2640_DSP_Qs 0x44
|
||||
#define OV2640_DSP_CTRL 0x50
|
||||
#define OV2640_DSP_HSIZE1 0x51
|
||||
#define OV2640_DSP_VSIZE1 0x52
|
||||
#define OV2640_DSP_XOFFL 0x53
|
||||
#define OV2640_DSP_YOFFL 0x54
|
||||
#define OV2640_DSP_VHYX 0x55
|
||||
#define OV2640_DSP_DPRP 0x56
|
||||
#define OV2640_DSP_TEST 0x57
|
||||
#define OV2640_DSP_ZMOW 0x5A
|
||||
#define OV2640_DSP_ZMOH 0x5B
|
||||
#define OV2640_DSP_ZMHH 0x5C
|
||||
#define OV2640_DSP_BPADDR 0x7C
|
||||
#define OV2640_DSP_BPDATA 0x7D
|
||||
#define OV2640_DSP_CTRL2 0x86
|
||||
#define OV2640_DSP_CTRL3 0x87
|
||||
#define OV2640_DSP_SIZEL 0x8C
|
||||
#define OV2640_DSP_HSIZE2 0xC0
|
||||
#define OV2640_DSP_VSIZE2 0xC1
|
||||
#define OV2640_DSP_CTRL0 0xC2
|
||||
#define OV2640_DSP_CTRL1 0xC3
|
||||
#define OV2640_DSP_R_DVP_SP 0xD3
|
||||
#define OV2640_DSP_IMAGE_MODE 0xDA
|
||||
#define OV2640_DSP_RESET 0xE0
|
||||
#define OV2640_DSP_MS_SP 0xF0
|
||||
#define OV2640_DSP_SS_ID 0x7F
|
||||
#define OV2640_DSP_SS_CTRL 0xF8
|
||||
#define OV2640_DSP_MC_BIST 0xF9
|
||||
#define OV2640_DSP_MC_AL 0xFA
|
||||
#define OV2640_DSP_MC_AH 0xFB
|
||||
#define OV2640_DSP_MC_D 0xFC
|
||||
#define OV2640_DSP_P_STATUS 0xFE
|
||||
#define OV2640_DSP_RA_DLMT 0xFF
|
||||
|
||||
//当选择传感器地址(0XFF=0X01)时,OV2640的DSP寄存器地址映射表
|
||||
#define OV2640_SENSOR_GAIN 0x00
|
||||
#define OV2640_SENSOR_COM1 0x03
|
||||
#define OV2640_SENSOR_REG04 0x04
|
||||
#define OV2640_SENSOR_REG08 0x08
|
||||
#define OV2640_SENSOR_COM2 0x09
|
||||
#define OV2640_SENSOR_PIDH 0x0A
|
||||
#define OV2640_SENSOR_PIDL 0x0B
|
||||
#define OV2640_SENSOR_COM3 0x0C
|
||||
#define OV2640_SENSOR_COM4 0x0D
|
||||
#define OV2640_SENSOR_AEC 0x10
|
||||
#define OV2640_SENSOR_CLKRC 0x11
|
||||
#define OV2640_SENSOR_COM7 0x12
|
||||
#define OV2640_SENSOR_COM8 0x13
|
||||
#define OV2640_SENSOR_COM9 0x14
|
||||
#define OV2640_SENSOR_COM10 0x15
|
||||
#define OV2640_SENSOR_HREFST 0x17
|
||||
#define OV2640_SENSOR_HREFEND 0x18
|
||||
#define OV2640_SENSOR_VSTART 0x19
|
||||
#define OV2640_SENSOR_VEND 0x1A
|
||||
#define OV2640_SENSOR_MIDH 0x1C
|
||||
#define OV2640_SENSOR_MIDL 0x1D
|
||||
#define OV2640_SENSOR_AEW 0x24
|
||||
#define OV2640_SENSOR_AEB 0x25
|
||||
#define OV2640_SENSOR_W 0x26
|
||||
#define OV2640_SENSOR_REG2A 0x2A
|
||||
#define OV2640_SENSOR_FRARL 0x2B
|
||||
#define OV2640_SENSOR_ADDVSL 0x2D
|
||||
#define OV2640_SENSOR_ADDVHS 0x2E
|
||||
#define OV2640_SENSOR_YAVG 0x2F
|
||||
#define OV2640_SENSOR_REG32 0x32
|
||||
#define OV2640_SENSOR_ARCOM2 0x34
|
||||
#define OV2640_SENSOR_REG45 0x45
|
||||
#define OV2640_SENSOR_FLL 0x46
|
||||
#define OV2640_SENSOR_FLH 0x47
|
||||
#define OV2640_SENSOR_COM19 0x48
|
||||
#define OV2640_SENSOR_ZOOMS 0x49
|
||||
#define OV2640_SENSOR_COM22 0x4B
|
||||
#define OV2640_SENSOR_COM25 0x4E
|
||||
#define OV2640_SENSOR_BD50 0x4F
|
||||
#define OV2640_SENSOR_BD60 0x50
|
||||
#define OV2640_SENSOR_REG5D 0x5D
|
||||
#define OV2640_SENSOR_REG5E 0x5E
|
||||
#define OV2640_SENSOR_REG5F 0x5F
|
||||
#define OV2640_SENSOR_REG60 0x60
|
||||
#define OV2640_SENSOR_HISTO_LOW 0x61
|
||||
#define OV2640_SENSOR_HISTO_HIGH 0x62
|
||||
|
||||
|
||||
|
||||
|
||||
uint8_t OV2640_Init(void);
|
||||
void OV2640_JPEG_Mode(void);
|
||||
void OV2640_RGB565_Mode(void);
|
||||
void OV2640_Auto_Exposure(uint8_t level);
|
||||
void OV2640_Light_Mode(uint8_t mode);
|
||||
void OV2640_Color_Saturation(uint8_t sat);
|
||||
void OV2640_Brightness(uint8_t bright);
|
||||
void OV2640_Contrast(uint8_t contrast);
|
||||
void OV2640_Special_Effects(uint8_t eft);
|
||||
void OV2640_Color_Bar(uint8_t sw);
|
||||
void OV2640_Window_Set(uint16_t sx,uint16_t sy,uint16_t width,uint16_t height);
|
||||
uint8_t OV2640_OutSize_Set(uint16_t width,uint16_t height);
|
||||
uint8_t OV2640_ImageWin_Set(uint16_t offx,uint16_t offy,uint16_t width,uint16_t height);
|
||||
uint8_t OV2640_ImageSize_Set(uint16_t width,uint16_t height);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
492
board/NUCLEO_STM32L496ZG/BSP/Hardware/Inc/ov2640cfg.h
Normal file
@@ -0,0 +1,492 @@
|
||||
#ifndef _OV2640CFG_H
|
||||
#define _OV2640CFG_H
|
||||
#include "ov2640.h"
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ѧϰʹ<CFB0>ã<EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><CEBA><EFBFBD>;
|
||||
//ALIENTEK STM32F407<30><37><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//OV2640 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>@ALIENTEK
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̳:www.openedv.com
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:2014/5/14
|
||||
//<2F>汾<EFBFBD><E6B1BE>V1.0
|
||||
//<2F><>Ȩ<EFBFBD><C8A8><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>
|
||||
//Copyright(C) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿƼ<D3BF><C6BC><EFBFBD><EFBFBD><EFBFBD>˾ 2014-2024
|
||||
//All rights reserved
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//OV2640 SXGA<47><41>ʼ<EFBFBD><CABC><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||
//<2F><>ģʽ<C4A3><CABD>֡<EFBFBD><D6A1>Ϊ15֡
|
||||
//SXGA(1600*1200)
|
||||
const uint8_t ov2640_sxga_init_reg_tbl[][2]=
|
||||
{
|
||||
0xff, 0x00,
|
||||
0x2c, 0xff,
|
||||
0x2e, 0xdf,
|
||||
0xff, 0x01,
|
||||
0x3c, 0x32,
|
||||
//
|
||||
0x11, 0x00,
|
||||
0x09, 0x02,
|
||||
0x04, 0xD8,//ˮƽ<CBAE><C6BD><EFBFBD><EFBFBD>,<2C><>ֱ<EFBFBD><D6B1>ת
|
||||
0x13, 0xe5,
|
||||
0x14, 0x48,
|
||||
0x2c, 0x0c,
|
||||
0x33, 0x78,
|
||||
0x3a, 0x33,
|
||||
0x3b, 0xfB,
|
||||
//
|
||||
0x3e, 0x00,
|
||||
0x43, 0x11,
|
||||
0x16, 0x10,
|
||||
//
|
||||
0x39, 0x92,
|
||||
//
|
||||
0x35, 0xda,
|
||||
0x22, 0x1a,
|
||||
0x37, 0xc3,
|
||||
0x23, 0x00,
|
||||
0x34, 0xc0,
|
||||
0x36, 0x1a,
|
||||
0x06, 0x88,
|
||||
0x07, 0xc0,
|
||||
0x0d, 0x87,
|
||||
0x0e, 0x41,
|
||||
0x4c, 0x00,
|
||||
|
||||
0x48, 0x00,
|
||||
0x5B, 0x00,
|
||||
0x42, 0x03,
|
||||
//
|
||||
0x4a, 0x81,
|
||||
0x21, 0x99,
|
||||
//
|
||||
0x24, 0x40,
|
||||
0x25, 0x38,
|
||||
0x26, 0x82,
|
||||
0x5c, 0x00,
|
||||
0x63, 0x00,
|
||||
0x46, 0x00,
|
||||
0x0c, 0x3c,
|
||||
//
|
||||
0x61, 0x70,
|
||||
0x62, 0x80,
|
||||
0x7c, 0x05,
|
||||
//
|
||||
0x20, 0x80,
|
||||
0x28, 0x30,
|
||||
0x6c, 0x00,
|
||||
0x6d, 0x80,
|
||||
0x6e, 0x00,
|
||||
0x70, 0x02,
|
||||
0x71, 0x94,
|
||||
0x73, 0xc1,
|
||||
0x3d, 0x34,
|
||||
0x5a, 0x57,
|
||||
//
|
||||
0x12, 0x00,//UXGA 1600*1200
|
||||
|
||||
0x17, 0x11,
|
||||
0x18, 0x75,
|
||||
0x19, 0x01,
|
||||
0x1a, 0x97,
|
||||
0x32, 0x36,
|
||||
0x03, 0x0f,
|
||||
0x37, 0x40,
|
||||
//
|
||||
0x4f, 0xca,
|
||||
0x50, 0xa8,
|
||||
0x5a, 0x23,
|
||||
0x6d, 0x00,
|
||||
0x6d, 0x38,
|
||||
//
|
||||
0xff, 0x00,
|
||||
0xe5, 0x7f,
|
||||
0xf9, 0xc0,
|
||||
0x41, 0x24,
|
||||
0xe0, 0x14,
|
||||
0x76, 0xff,
|
||||
0x33, 0xa0,
|
||||
0x42, 0x20,
|
||||
0x43, 0x18,
|
||||
0x4c, 0x00,
|
||||
0x87, 0xd5,
|
||||
0x88, 0x3f,
|
||||
0xd7, 0x03,
|
||||
0xd9, 0x10,
|
||||
0xd3, 0x82,
|
||||
//
|
||||
0xc8, 0x08,
|
||||
0xc9, 0x80,
|
||||
//
|
||||
0x7c, 0x00,
|
||||
0x7d, 0x00,
|
||||
0x7c, 0x03,
|
||||
0x7d, 0x48,
|
||||
0x7d, 0x48,
|
||||
0x7c, 0x08,
|
||||
0x7d, 0x20,
|
||||
0x7d, 0x10,
|
||||
0x7d, 0x0e,
|
||||
//
|
||||
0x90, 0x00,
|
||||
0x91, 0x0e,
|
||||
0x91, 0x1a,
|
||||
0x91, 0x31,
|
||||
0x91, 0x5a,
|
||||
0x91, 0x69,
|
||||
0x91, 0x75,
|
||||
0x91, 0x7e,
|
||||
0x91, 0x88,
|
||||
0x91, 0x8f,
|
||||
0x91, 0x96,
|
||||
0x91, 0xa3,
|
||||
0x91, 0xaf,
|
||||
0x91, 0xc4,
|
||||
0x91, 0xd7,
|
||||
0x91, 0xe8,
|
||||
0x91, 0x20,
|
||||
//
|
||||
0x92, 0x00,
|
||||
0x93, 0x06,
|
||||
0x93, 0xe3,
|
||||
0x93, 0x05,
|
||||
0x93, 0x05,
|
||||
0x93, 0x00,
|
||||
0x93, 0x04,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
//
|
||||
0x96, 0x00,
|
||||
0x97, 0x08,
|
||||
0x97, 0x19,
|
||||
0x97, 0x02,
|
||||
0x97, 0x0c,
|
||||
0x97, 0x24,
|
||||
0x97, 0x30,
|
||||
0x97, 0x28,
|
||||
0x97, 0x26,
|
||||
0x97, 0x02,
|
||||
0x97, 0x98,
|
||||
0x97, 0x80,
|
||||
0x97, 0x00,
|
||||
0x97, 0x00,
|
||||
//
|
||||
0xc3, 0xef,
|
||||
|
||||
0xa4, 0x00,
|
||||
0xa8, 0x00,
|
||||
0xc5, 0x11,
|
||||
0xc6, 0x51,
|
||||
0xbf, 0x80,
|
||||
0xc7, 0x10,
|
||||
0xb6, 0x66,
|
||||
0xb8, 0xA5,
|
||||
0xb7, 0x64,
|
||||
0xb9, 0x7C,
|
||||
0xb3, 0xaf,
|
||||
0xb4, 0x97,
|
||||
0xb5, 0xFF,
|
||||
0xb0, 0xC5,
|
||||
0xb1, 0x94,
|
||||
0xb2, 0x0f,
|
||||
0xc4, 0x5c,
|
||||
//
|
||||
0xc0, 0xc8,
|
||||
0xc1, 0x96,
|
||||
0x8c, 0x00,
|
||||
0x86, 0x3d,
|
||||
0x50, 0x00,
|
||||
0x51, 0x90,
|
||||
0x52, 0x2c,
|
||||
0x53, 0x00,
|
||||
0x54, 0x00,
|
||||
0x55, 0x88,
|
||||
|
||||
0x5a, 0x90,
|
||||
0x5b, 0x2C,
|
||||
0x5c, 0x05,
|
||||
|
||||
0xd3, 0x02,//auto<74><6F><EFBFBD><EFBFBD>ҪС<D2AA><D0A1>
|
||||
//
|
||||
0xc3, 0xed,
|
||||
0x7f, 0x00,
|
||||
|
||||
0xda, 0x09,
|
||||
|
||||
0xe5, 0x1f,
|
||||
0xe1, 0x67,
|
||||
0xe0, 0x00,
|
||||
0xdd, 0x7f,
|
||||
0x05, 0x00,
|
||||
};
|
||||
//OV2640 SVGA<47><41>ʼ<EFBFBD><CABC><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||
//<2F><>ģʽ<C4A3><CABD>,֡<>ʿ<EFBFBD><CABF>Դﵽ30֡
|
||||
//SVGA 800*600
|
||||
const uint8_t ov2640_svga_init_reg_tbl[][2]=
|
||||
{
|
||||
0xff, 0x00,
|
||||
0x2c, 0xff,
|
||||
0x2e, 0xdf,
|
||||
0xff, 0x01,
|
||||
0x3c, 0x32,
|
||||
//
|
||||
0x11, 0x00,
|
||||
0x09, 0x02,
|
||||
0x04, 0xD8,//ˮƽ<CBAE><C6BD><EFBFBD><EFBFBD>,<2C><>ֱ<EFBFBD><D6B1>ת
|
||||
0x13, 0xe5,
|
||||
0x14, 0x48,
|
||||
0x2c, 0x0c,
|
||||
0x33, 0x78,
|
||||
0x3a, 0x33,
|
||||
0x3b, 0xfB,
|
||||
//
|
||||
0x3e, 0x00,
|
||||
0x43, 0x11,
|
||||
0x16, 0x10,
|
||||
//
|
||||
0x39, 0x92,
|
||||
//
|
||||
0x35, 0xda,
|
||||
0x22, 0x1a,
|
||||
0x37, 0xc3,
|
||||
0x23, 0x00,
|
||||
0x34, 0xc0,
|
||||
0x36, 0x1a,
|
||||
0x06, 0x88,
|
||||
0x07, 0xc0,
|
||||
0x0d, 0x87,
|
||||
0x0e, 0x41,
|
||||
0x4c, 0x00,
|
||||
0x48, 0x00,
|
||||
0x5B, 0x00,
|
||||
0x42, 0x03,
|
||||
//
|
||||
0x4a, 0x81,
|
||||
0x21, 0x99,
|
||||
//
|
||||
0x24, 0x40,
|
||||
0x25, 0x38,
|
||||
0x26, 0x82,
|
||||
0x5c, 0x00,
|
||||
0x63, 0x00,
|
||||
0x46, 0x22,
|
||||
0x0c, 0x3c,
|
||||
//
|
||||
0x61, 0x70,
|
||||
0x62, 0x80,
|
||||
0x7c, 0x05,
|
||||
//
|
||||
0x20, 0x80,
|
||||
0x28, 0x30,
|
||||
0x6c, 0x00,
|
||||
0x6d, 0x80,
|
||||
0x6e, 0x00,
|
||||
0x70, 0x02,
|
||||
0x71, 0x94,
|
||||
0x73, 0xc1,
|
||||
|
||||
0x3d, 0x34,
|
||||
0x5a, 0x57,
|
||||
//<2F><><EFBFBD>ݷֱ<DDB7><D6B1>ʲ<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
0x12, 0x40,//SVGA 800*600
|
||||
0x17, 0x11,
|
||||
0x18, 0x43,
|
||||
0x19, 0x00,
|
||||
0x1a, 0x4b,
|
||||
0x32, 0x09,
|
||||
0x37, 0xc0,
|
||||
//
|
||||
0x4f, 0xca,
|
||||
0x50, 0xa8,
|
||||
0x5a, 0x23,
|
||||
0x6d, 0x00,
|
||||
0x3d, 0x38,
|
||||
//
|
||||
0xff, 0x00,
|
||||
0xe5, 0x7f,
|
||||
0xf9, 0xc0,
|
||||
0x41, 0x24,
|
||||
0xe0, 0x14,
|
||||
0x76, 0xff,
|
||||
0x33, 0xa0,
|
||||
0x42, 0x20,
|
||||
0x43, 0x18,
|
||||
0x4c, 0x00,
|
||||
0x87, 0xd5,
|
||||
0x88, 0x3f,
|
||||
0xd7, 0x03,
|
||||
0xd9, 0x10,
|
||||
0xd3, 0x82,
|
||||
//
|
||||
0xc8, 0x08,
|
||||
0xc9, 0x80,
|
||||
//
|
||||
0x7c, 0x00,
|
||||
0x7d, 0x00,
|
||||
0x7c, 0x03,
|
||||
0x7d, 0x48,
|
||||
0x7d, 0x48,
|
||||
0x7c, 0x08,
|
||||
0x7d, 0x20,
|
||||
0x7d, 0x10,
|
||||
0x7d, 0x0e,
|
||||
//
|
||||
0x90, 0x00,
|
||||
0x91, 0x0e,
|
||||
0x91, 0x1a,
|
||||
0x91, 0x31,
|
||||
0x91, 0x5a,
|
||||
0x91, 0x69,
|
||||
0x91, 0x75,
|
||||
0x91, 0x7e,
|
||||
0x91, 0x88,
|
||||
0x91, 0x8f,
|
||||
0x91, 0x96,
|
||||
0x91, 0xa3,
|
||||
0x91, 0xaf,
|
||||
0x91, 0xc4,
|
||||
0x91, 0xd7,
|
||||
0x91, 0xe8,
|
||||
0x91, 0x20,
|
||||
//
|
||||
0x92, 0x00,
|
||||
0x93, 0x06,
|
||||
0x93, 0xe3,
|
||||
0x93, 0x05,
|
||||
0x93, 0x05,
|
||||
0x93, 0x00,
|
||||
0x93, 0x04,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
0x93, 0x00,
|
||||
//
|
||||
0x96, 0x00,
|
||||
0x97, 0x08,
|
||||
0x97, 0x19,
|
||||
0x97, 0x02,
|
||||
0x97, 0x0c,
|
||||
0x97, 0x24,
|
||||
0x97, 0x30,
|
||||
0x97, 0x28,
|
||||
0x97, 0x26,
|
||||
0x97, 0x02,
|
||||
0x97, 0x98,
|
||||
0x97, 0x80,
|
||||
0x97, 0x00,
|
||||
0x97, 0x00,
|
||||
//
|
||||
0xc3, 0xed,
|
||||
0xa4, 0x00,
|
||||
0xa8, 0x00,
|
||||
0xc5, 0x11,
|
||||
0xc6, 0x51,
|
||||
0xbf, 0x80,
|
||||
0xc7, 0x10,
|
||||
0xb6, 0x66,
|
||||
0xb8, 0xA5,
|
||||
0xb7, 0x64,
|
||||
0xb9, 0x7C,
|
||||
0xb3, 0xaf,
|
||||
0xb4, 0x97,
|
||||
0xb5, 0xFF,
|
||||
0xb0, 0xC5,
|
||||
0xb1, 0x94,
|
||||
0xb2, 0x0f,
|
||||
0xc4, 0x5c,
|
||||
//<2F><><EFBFBD>ݷֱ<DDB7><D6B1>ʲ<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
0xc0, 0x64,
|
||||
0xc1, 0x4B,
|
||||
0x8c, 0x00,
|
||||
0x86, 0x3D,
|
||||
0x50, 0x00,
|
||||
0x51, 0xC8,
|
||||
0x52, 0x96,
|
||||
0x53, 0x00,
|
||||
0x54, 0x00,
|
||||
0x55, 0x00,
|
||||
0x5a, 0xC8,
|
||||
0x5b, 0x96,
|
||||
0x5c, 0x00,
|
||||
|
||||
0xd3, 0x02,//auto<74><6F><EFBFBD><EFBFBD>ҪС<D2AA><D0A1>
|
||||
//
|
||||
0xc3, 0xed,
|
||||
0x7f, 0x00,
|
||||
|
||||
0xda, 0x09,
|
||||
|
||||
0xe5, 0x1f,
|
||||
0xe1, 0x67,
|
||||
0xe0, 0x00,
|
||||
0xdd, 0x7f,
|
||||
0x05, 0x00,
|
||||
};
|
||||
const uint8_t ov2640_jpeg_reg_tbl[][2]=
|
||||
{
|
||||
0xff, 0x01,
|
||||
0xe0, 0x14,
|
||||
0xe1, 0x77,
|
||||
0xe5, 0x1f,
|
||||
0xd7, 0x03,
|
||||
0xda, 0x10,
|
||||
0xe0, 0x00,
|
||||
};
|
||||
const uint8_t ov2640_rgb565_reg_tbl[][2]=
|
||||
{
|
||||
0xFF, 0x00,
|
||||
0xDA, 0x09,
|
||||
0xD7, 0x03,
|
||||
0xDF, 0x02,
|
||||
0x33, 0xa0,
|
||||
0x3C, 0x00,
|
||||
0xe1, 0x67,
|
||||
|
||||
0xff, 0x01,
|
||||
0xe0, 0x00,
|
||||
0xe1, 0x00,
|
||||
0xe5, 0x00,
|
||||
0xd7, 0x00,
|
||||
0xda, 0x00,
|
||||
0xe0, 0x00,
|
||||
};
|
||||
const uint8_t ov2640_yuv422_reg_tbl[][2]=
|
||||
{
|
||||
0xFF, 0x00,
|
||||
0xDA, 0x10,
|
||||
0xD7, 0x03,
|
||||
0xDF, 0x00,
|
||||
0x33, 0x80,
|
||||
0x3C, 0x40,
|
||||
0xe1, 0x77,
|
||||
0x00, 0x00,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
47
board/NUCLEO_STM32L496ZG/BSP/Hardware/Inc/sccb.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef __SCCB_H
|
||||
#define __SCCB_H
|
||||
#include "sys.h"
|
||||
#include "gpio.h"
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//本程序参考自网友guanfu_wang代码。
|
||||
//ALIENTEK STM32F103开发板
|
||||
//SCCB 驱动代码
|
||||
//正点原子@ALIENTEK
|
||||
//技术论坛:www.openedv.com
|
||||
//创建日期:2015/4/16
|
||||
//版本:V1.0
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//IO操作函数
|
||||
#define SCCB_SDA_IN() {GPIOB->MODER&=~(3<<(5*2));GPIOB->MODER|=0<<5*2;} //PD7 输入
|
||||
#define SCCB_SDA_OUT() {GPIOB->MODER&=~(3<<(5*2));GPIOB->MODER|=1<<5*2;} //PD7 输出
|
||||
#define SCCB_ID 0X60 //OV2640的ID
|
||||
|
||||
//IO方向设置
|
||||
#define SCCB_SDA_IN() {GPIOB->MODER&=~(3<<(5*2));GPIOB->MODER|=0<<5*2;} //PD7 输入
|
||||
#define SCCB_SDA_OUT() {GPIOB->MODER&=~(3<<(5*2));GPIOB->MODER|=1<<5*2;} //PD7 输出
|
||||
|
||||
#define SCCB_ID 0X60 //OV2640的ID
|
||||
|
||||
void SCCB_Init(void);
|
||||
void SCCB_Start(void);
|
||||
void SCCB_Stop(void);
|
||||
void SCCB_No_Ack(void);
|
||||
uint8_t SCCB_WR_Byte(uint8_t dat);
|
||||
uint8_t SCCB_RD_Byte(void);
|
||||
uint8_t SCCB_WR_Reg(uint8_t reg,uint8_t data);
|
||||
uint8_t SCCB_RD_Reg(uint8_t reg);
|
||||
|
||||
void SCCB_SCL(uint8_t sccb_scl);
|
||||
void SCCB_SDA(uint8_t sccb_sda);
|
||||
uint8_t SCCB_READ_SDA(void);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
82
board/NUCLEO_STM32L496ZG/BSP/Hardware/Src/delay.c
Normal file
@@ -0,0 +1,82 @@
|
||||
#include "delay.h"
|
||||
#include "sys.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void delay_us(uint32_t time_us) {
|
||||
uint32_t clk = 80; // CPU 80MHz
|
||||
uint32_t ticks = time_us * clk; // time is us
|
||||
uint32_t told = SysTick->VAL;
|
||||
uint32_t tnow = told;
|
||||
uint32_t tcnt = 0;
|
||||
for(; tcnt<ticks; tnow=SysTick->VAL)
|
||||
{
|
||||
if(tnow != told) {
|
||||
if(tnow < told) {
|
||||
tcnt += told - tnow;
|
||||
} else {
|
||||
tcnt += SysTick->LOAD-tnow + told;
|
||||
} told = tnow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void delay_ms(uint32_t time_ms) {
|
||||
uint32_t clk = 80; // CPU 80MHz
|
||||
uint32_t ticks = time_ms * clk * 1000; // time is ms
|
||||
uint32_t told = SysTick->VAL;
|
||||
uint32_t tnow = told;
|
||||
uint32_t tcnt = 0;
|
||||
for(; tcnt<ticks; tnow=SysTick->VAL)
|
||||
{
|
||||
if(tnow != told) {
|
||||
if(tnow < told) {
|
||||
tcnt += told - tnow;
|
||||
} else {
|
||||
tcnt += SysTick->LOAD-tnow + told;
|
||||
} told = tnow;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
307
board/NUCLEO_STM32L496ZG/BSP/Hardware/Src/lcd_2inch4.c
Normal file
@@ -0,0 +1,307 @@
|
||||
/*****************************************************************************
|
||||
* | File : LCD_2IN4_Driver.c
|
||||
* | Author : Waveshare team
|
||||
* | Function : LCD driver
|
||||
* | Info :
|
||||
*----------------
|
||||
* | This version: V1.0
|
||||
* | Date : 2020-07-29
|
||||
* | Info :
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documnetation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
******************************************************************************/
|
||||
#include "lcd_2inch4.h"
|
||||
#include <string.h>
|
||||
/*******************************************************************************
|
||||
function:
|
||||
Hardware reset
|
||||
*******************************************************************************/
|
||||
static void LCD_2IN4_Reset(void)
|
||||
{
|
||||
LCD_2IN4_RST_1;
|
||||
DEV_Delay_ms(100);
|
||||
LCD_2IN4_RST_0;
|
||||
DEV_Delay_ms(100);
|
||||
LCD_2IN4_RST_1;
|
||||
DEV_Delay_ms(100);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
function:
|
||||
Write data and commands
|
||||
*******************************************************************************/
|
||||
static void LCD_2IN4_Write_Command(UBYTE data)
|
||||
{
|
||||
LCD_2IN4_CS_0;
|
||||
LCD_2IN4_DC_0;
|
||||
DEV_SPI_WRITE(data);
|
||||
}
|
||||
|
||||
static void LCD_2IN4_WriteData_Byte(UBYTE data)
|
||||
{
|
||||
LCD_2IN4_CS_0;
|
||||
LCD_2IN4_DC_1;
|
||||
DEV_SPI_WRITE(data);
|
||||
LCD_2IN4_CS_1;
|
||||
}
|
||||
|
||||
void LCD_2IN4_WriteData_Word(UWORD data)
|
||||
{
|
||||
LCD_2IN4_CS_0;
|
||||
LCD_2IN4_DC_1;
|
||||
DEV_SPI_WRITE((data>>8) & 0xff);
|
||||
DEV_SPI_WRITE(data);
|
||||
LCD_2IN4_CS_1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function:
|
||||
Common register initialization
|
||||
******************************************************************************/
|
||||
void LCD_2IN4_Init(void)
|
||||
{
|
||||
LCD_2IN4_Reset();
|
||||
|
||||
LCD_2IN4_SetBackLight(500);
|
||||
HAL_Delay(100);
|
||||
|
||||
//************* Start Initial Sequence **********//
|
||||
LCD_2IN4_Write_Command(0x11); //Sleep out
|
||||
HAL_Delay(120); //Delay 120ms
|
||||
//************* Start Initial Sequence **********//
|
||||
LCD_2IN4_Write_Command(0xCF);
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_WriteData_Byte(0xC1);
|
||||
LCD_2IN4_WriteData_Byte(0X30);
|
||||
LCD_2IN4_Write_Command(0xED);
|
||||
LCD_2IN4_WriteData_Byte(0x64);
|
||||
LCD_2IN4_WriteData_Byte(0x03);
|
||||
LCD_2IN4_WriteData_Byte(0X12);
|
||||
LCD_2IN4_WriteData_Byte(0X81);
|
||||
LCD_2IN4_Write_Command(0xE8);
|
||||
LCD_2IN4_WriteData_Byte(0x85);
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_WriteData_Byte(0x79);
|
||||
LCD_2IN4_Write_Command(0xCB);
|
||||
LCD_2IN4_WriteData_Byte(0x39);
|
||||
LCD_2IN4_WriteData_Byte(0x2C);
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_WriteData_Byte(0x34);
|
||||
LCD_2IN4_WriteData_Byte(0x02);
|
||||
LCD_2IN4_Write_Command(0xF7);
|
||||
LCD_2IN4_WriteData_Byte(0x20);
|
||||
LCD_2IN4_Write_Command(0xEA);
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_Write_Command(0xC0); //Power control
|
||||
LCD_2IN4_WriteData_Byte(0x1D); //VRH[5:0]
|
||||
LCD_2IN4_Write_Command(0xC1); //Power control
|
||||
LCD_2IN4_WriteData_Byte(0x12); //SAP[2:0];BT[3:0]
|
||||
LCD_2IN4_Write_Command(0xC5); //VCM control
|
||||
LCD_2IN4_WriteData_Byte(0x33);
|
||||
LCD_2IN4_WriteData_Byte(0x3F);
|
||||
LCD_2IN4_Write_Command(0xC7); //VCM control
|
||||
LCD_2IN4_WriteData_Byte(0x92);
|
||||
LCD_2IN4_Write_Command(0x3A); // Memory Access Control
|
||||
LCD_2IN4_WriteData_Byte(0x55);
|
||||
LCD_2IN4_Write_Command(0x36); // Memory Access Control
|
||||
LCD_2IN4_WriteData_Byte(0x08);
|
||||
LCD_2IN4_Write_Command(0xB1);
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_WriteData_Byte(0x12);
|
||||
LCD_2IN4_Write_Command(0xB6); // Display Function Control
|
||||
LCD_2IN4_WriteData_Byte(0x0A);
|
||||
LCD_2IN4_WriteData_Byte(0xA2);
|
||||
|
||||
LCD_2IN4_Write_Command(0x44);
|
||||
LCD_2IN4_WriteData_Byte(0x02);
|
||||
|
||||
LCD_2IN4_Write_Command(0xF2); // 3Gamma Function Disable
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_Write_Command(0x26); //Gamma curve selected
|
||||
LCD_2IN4_WriteData_Byte(0x01);
|
||||
LCD_2IN4_Write_Command(0xE0); //Set Gamma
|
||||
LCD_2IN4_WriteData_Byte(0x0F);
|
||||
LCD_2IN4_WriteData_Byte(0x22);
|
||||
LCD_2IN4_WriteData_Byte(0x1C);
|
||||
LCD_2IN4_WriteData_Byte(0x1B);
|
||||
LCD_2IN4_WriteData_Byte(0x08);
|
||||
LCD_2IN4_WriteData_Byte(0x0F);
|
||||
LCD_2IN4_WriteData_Byte(0x48);
|
||||
LCD_2IN4_WriteData_Byte(0xB8);
|
||||
LCD_2IN4_WriteData_Byte(0x34);
|
||||
LCD_2IN4_WriteData_Byte(0x05);
|
||||
LCD_2IN4_WriteData_Byte(0x0C);
|
||||
LCD_2IN4_WriteData_Byte(0x09);
|
||||
LCD_2IN4_WriteData_Byte(0x0F);
|
||||
LCD_2IN4_WriteData_Byte(0x07);
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_Write_Command(0XE1); //Set Gamma
|
||||
LCD_2IN4_WriteData_Byte(0x00);
|
||||
LCD_2IN4_WriteData_Byte(0x23);
|
||||
LCD_2IN4_WriteData_Byte(0x24);
|
||||
LCD_2IN4_WriteData_Byte(0x07);
|
||||
LCD_2IN4_WriteData_Byte(0x10);
|
||||
LCD_2IN4_WriteData_Byte(0x07);
|
||||
LCD_2IN4_WriteData_Byte(0x38);
|
||||
LCD_2IN4_WriteData_Byte(0x47);
|
||||
LCD_2IN4_WriteData_Byte(0x4B);
|
||||
LCD_2IN4_WriteData_Byte(0x0A);
|
||||
LCD_2IN4_WriteData_Byte(0x13);
|
||||
LCD_2IN4_WriteData_Byte(0x06);
|
||||
LCD_2IN4_WriteData_Byte(0x30);
|
||||
LCD_2IN4_WriteData_Byte(0x38);
|
||||
LCD_2IN4_WriteData_Byte(0x0F);
|
||||
LCD_2IN4_Write_Command(0x29); //Display on
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
function: Set the cursor position
|
||||
parameter :
|
||||
Xstart: Start UWORD x coordinate
|
||||
Ystart: Start UWORD y coordinate
|
||||
Xend : End UWORD coordinates
|
||||
Yend : End UWORD coordinatesen
|
||||
******************************************************************************/
|
||||
void LCD_2IN4_SetWindow(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend)
|
||||
{
|
||||
LCD_2IN4_Write_Command(0x2a);
|
||||
LCD_2IN4_WriteData_Byte(Xstart >>8);
|
||||
LCD_2IN4_WriteData_Byte(Xstart & 0xff);
|
||||
LCD_2IN4_WriteData_Byte((Xend - 1) >> 8);
|
||||
LCD_2IN4_WriteData_Byte((Xend - 1) & 0xff);
|
||||
|
||||
LCD_2IN4_Write_Command(0x2b);
|
||||
LCD_2IN4_WriteData_Byte(Ystart >>8);
|
||||
LCD_2IN4_WriteData_Byte(Ystart & 0xff);
|
||||
LCD_2IN4_WriteData_Byte((Yend - 1) >> 8);
|
||||
LCD_2IN4_WriteData_Byte((Yend - 1) & 0xff);
|
||||
|
||||
LCD_2IN4_Write_Command(0x2C);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function: Settings window
|
||||
parameter :
|
||||
Xstart: Start UWORD x coordinate
|
||||
Ystart: Start UWORD y coordinate
|
||||
|
||||
******************************************************************************/
|
||||
void LCD_2IN4_SetCursor(UWORD X, UWORD Y)
|
||||
{
|
||||
LCD_2IN4_Write_Command(0x2a);
|
||||
LCD_2IN4_WriteData_Byte(X >> 8);
|
||||
LCD_2IN4_WriteData_Byte(X);
|
||||
LCD_2IN4_WriteData_Byte(X >> 8);
|
||||
LCD_2IN4_WriteData_Byte(X);
|
||||
|
||||
LCD_2IN4_Write_Command(0x2b);
|
||||
LCD_2IN4_WriteData_Byte(Y >> 8);
|
||||
LCD_2IN4_WriteData_Byte(Y);
|
||||
LCD_2IN4_WriteData_Byte(Y >> 8);
|
||||
LCD_2IN4_WriteData_Byte(Y);
|
||||
|
||||
LCD_2IN4_Write_Command(0x2C);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function: Clear screen function, refresh the screen to a certain color
|
||||
parameter :
|
||||
Color : The color you want to clear all the screen
|
||||
******************************************************************************/
|
||||
void LCD_2IN4_Clear(UWORD Color)
|
||||
{
|
||||
UWORD i,j;
|
||||
LCD_2IN4_SetWindow(0, 0, LCD_2IN4_WIDTH, LCD_2IN4_HEIGHT);
|
||||
|
||||
DEV_Digital_Write(DEV_DC_PIN, 1);
|
||||
for(i = 0; i < LCD_2IN4_WIDTH; i++){
|
||||
for(j = 0; j < LCD_2IN4_HEIGHT; j++){
|
||||
LCD_2IN4_WriteData_Word(Color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function: Refresh a certain area to the same color
|
||||
parameter :
|
||||
Xstart: Start UWORD x coordinate
|
||||
Ystart: Start UWORD y coordinate
|
||||
Xend : End UWORD coordinates
|
||||
Yend : End UWORD coordinates
|
||||
color : Set the color
|
||||
******************************************************************************/
|
||||
void LCD_2IN4_ClearWindow(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend,UWORD color)
|
||||
{
|
||||
UWORD i,j;
|
||||
LCD_2IN4_SetWindow(Xstart, Ystart, Xend,Yend);
|
||||
for(i = Ystart; i <= Yend; i++){
|
||||
for(j = Xstart; j <= Xend; j++){
|
||||
LCD_2IN4_WriteData_Word(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function: Show a picture
|
||||
parameter :
|
||||
image: Picture buffer
|
||||
******************************************************************************/
|
||||
void LCD_2IN4_Display(UWORD *image,int width, int height)
|
||||
{
|
||||
UWORD i,j;
|
||||
|
||||
if(width > LCD_2IN4_WIDTH || height > LCD_2IN4_HEIGHT){
|
||||
printf("Picture size out of range!\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
LCD_2IN4_SetWindow(0, 0, width, height);
|
||||
DEV_Digital_Write(DEV_DC_PIN, 1);
|
||||
for(i = 0; i < width; i++){
|
||||
for(j = 0; j < height; j++){
|
||||
LCD_2IN4_WriteData_Word(*(image+i*height+j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
function: Draw a point
|
||||
parameter :
|
||||
X : Set the X coordinate
|
||||
Y : Set the Y coordinate
|
||||
Color : Set the color
|
||||
******************************************************************************/
|
||||
void LCD_2IN4_DrawPaint(UWORD x, UWORD y, UWORD Color)
|
||||
{
|
||||
LCD_2IN4_SetCursor(x, y);
|
||||
LCD_2IN4_WriteData_Word(Color);
|
||||
}
|
||||
/*******************************************************************************
|
||||
function:
|
||||
Setting backlight
|
||||
parameter :
|
||||
value : Range 0~1000 Duty cycle is value/1000
|
||||
*******************************************************************************/
|
||||
void LCD_2IN4_SetBackLight(UWORD Value)
|
||||
{
|
||||
DEV_Set_PWM(Value);
|
||||
}
|
66
board/NUCLEO_STM32L496ZG/BSP/Hardware/Src/lcd_config.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/*****************************************************************************
|
||||
* | File : DEV_Config.c
|
||||
* | Author : Waveshare team
|
||||
* | Function : Hardware underlying interface
|
||||
* | Info :
|
||||
* Used to shield the underlying layers of each master
|
||||
* and enhance portability
|
||||
*----------------
|
||||
* | This version: V1.0
|
||||
* | Date : 2018-11-22
|
||||
* | Info :
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documnetation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
******************************************************************************/
|
||||
#include "lcd_config.h"
|
||||
|
||||
/********************************************************************************
|
||||
function: Delay function
|
||||
note:
|
||||
Driver_Delay_ms(xms) : Delay x ms
|
||||
********************************************************************************/
|
||||
void DEV_delay_ms(uint16_t xms )
|
||||
{
|
||||
HAL_Delay(xms);
|
||||
}
|
||||
|
||||
|
||||
void DEV_SPI_WRite(UBYTE _dat)
|
||||
{
|
||||
HAL_SPI_Transmit(&hspi1, (uint8_t *)&_dat, 1, 500);
|
||||
}
|
||||
|
||||
int DEV_Module_Init(void)
|
||||
{
|
||||
DEV_Digital_Write(DEV_DC_PIN, 1);
|
||||
DEV_Digital_Write(DEV_CS_PIN, 1);
|
||||
DEV_Digital_Write(DEV_RST_PIN, 1);
|
||||
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DEV_Module_Exit(void)
|
||||
{
|
||||
DEV_Digital_Write(DEV_DC_PIN, 0);
|
||||
DEV_Digital_Write(DEV_CS_PIN, 0);
|
||||
//close
|
||||
DEV_Digital_Write(DEV_RST_PIN, 0);
|
||||
HAL_TIM_PWM_Stop(&htim4,TIM_CHANNEL_1);
|
||||
}
|
442
board/NUCLEO_STM32L496ZG/BSP/Hardware/Src/ov2640.c
Normal file
@@ -0,0 +1,442 @@
|
||||
#include "sys.h"
|
||||
#include "ov2640.h"
|
||||
#include "ov2640cfg.h"
|
||||
//#include "timer.h"
|
||||
#include "delay.h"
|
||||
#include "usart.h"
|
||||
#include "sccb.h"
|
||||
#include "stdio.h"
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//本程序只供学习使用,未经作者许可,不得用于其它任何用途
|
||||
//ALIENTEK STM32F103开发板
|
||||
//OV2640 驱动代码
|
||||
//正点原子@ALIENTEK
|
||||
//技术论坛:www.openedv.com
|
||||
//创建日期:2015/4/16
|
||||
//版本:V1.0
|
||||
//版权所有,盗版必究。
|
||||
//Copyright(C) 广州市星翼电子科技有限公司 2014-2024
|
||||
//All rights reserved
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//初始化OV2640
|
||||
//配置完以后,默认输出是1600*1200尺寸的图片!!
|
||||
//返回值:0,成功
|
||||
// 其他,错误代码
|
||||
void OV2640_PWDN(uint8_t signal)
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_15, (GPIO_PinState)signal);
|
||||
}
|
||||
|
||||
void OV2640_RST(uint8_t signal)
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13, (GPIO_PinState)signal);
|
||||
}
|
||||
|
||||
uint8_t OV2640_Init(void)
|
||||
{
|
||||
uint16_t i=0;
|
||||
uint16_t reg;
|
||||
//设置IO
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
__HAL_RCC_GPIOG_CLK_ENABLE(); //使能GPIOB时钟
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13|GPIO_PIN_15, GPIO_PIN_RESET);
|
||||
//GPIOF9,F10初始化设置
|
||||
GPIO_InitStructure.Pin = GPIO_PIN_13|GPIO_PIN_15;
|
||||
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStructure.Speed = GPIO_SPEED_FAST;
|
||||
GPIO_InitStructure.Pull = GPIO_PULLUP;//上拉
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStructure);//初始<E5889D>
|
||||
|
||||
OV2640_PWDN(0); //POWER ON
|
||||
delay_ms(10);
|
||||
OV2640_RST(0); //复位OV2640
|
||||
delay_ms(10);
|
||||
OV2640_RST(1); //结束复位
|
||||
SCCB_Init(); //初始化SCCB 的IO口
|
||||
SCCB_WR_Reg(OV2640_DSP_RA_DLMT, 0x01); //操作sensor寄存器
|
||||
SCCB_WR_Reg(OV2640_SENSOR_COM7, 0x80); //软复位OV2640
|
||||
delay_ms(50);
|
||||
reg=SCCB_RD_Reg(OV2640_SENSOR_MIDH); //读取厂家ID 高八位
|
||||
reg<<=8;
|
||||
reg|=SCCB_RD_Reg(OV2640_SENSOR_MIDL); //读取厂家ID 低八位
|
||||
printf("OV2640_MID = %#X\n" , reg);
|
||||
if(reg!=OV2640_MID)
|
||||
{
|
||||
printf("MID:%d\r\n",reg);
|
||||
return 1;
|
||||
}
|
||||
reg=SCCB_RD_Reg(OV2640_SENSOR_PIDH); //读取厂家ID 高八位
|
||||
reg<<=8;
|
||||
reg|=SCCB_RD_Reg(OV2640_SENSOR_PIDL); //读取厂家ID 低八位
|
||||
if(reg!=OV2640_PID)
|
||||
{
|
||||
printf("HID:%d\r\n",reg);
|
||||
return 2;
|
||||
}
|
||||
for(i=0;i<sizeof(ov2640_svga_init_reg_tbl)/2;i++)
|
||||
{
|
||||
SCCB_WR_Reg(ov2640_svga_init_reg_tbl[i][0],ov2640_svga_init_reg_tbl[i][1]);
|
||||
}
|
||||
printf("OV2640_init SUCCESS\n");
|
||||
return 0x00; //ok
|
||||
}
|
||||
//OV2640切换为JPEG模式
|
||||
void OV2640_JPEG_Mode(void)
|
||||
{
|
||||
uint16_t i=0;
|
||||
//设置:YUV422格式
|
||||
for(i=0;i<(sizeof(ov2640_yuv422_reg_tbl)/2);i++)
|
||||
{
|
||||
SCCB_WR_Reg(ov2640_yuv422_reg_tbl[i][0],ov2640_yuv422_reg_tbl[i][1]);
|
||||
}
|
||||
|
||||
//设置:输出JPEG数据
|
||||
for(i=0;i<(sizeof(ov2640_jpeg_reg_tbl)/2);i++)
|
||||
{
|
||||
SCCB_WR_Reg(ov2640_jpeg_reg_tbl[i][0],ov2640_jpeg_reg_tbl[i][1]);
|
||||
}
|
||||
}
|
||||
//OV2640切换为RGB565模式
|
||||
void OV2640_RGB565_Mode(void)
|
||||
{
|
||||
uint16_t i=0;
|
||||
//设置:RGB565输出
|
||||
for(i=0;i<(sizeof(ov2640_rgb565_reg_tbl)/2);i++)
|
||||
{
|
||||
SCCB_WR_Reg(ov2640_rgb565_reg_tbl[i][0],ov2640_rgb565_reg_tbl[i][1]);
|
||||
}
|
||||
printf("OV2640_RGB565 SET!\n");
|
||||
}
|
||||
//自动曝光设置参数表,支持5个等级
|
||||
const static uint8_t OV2640_AUTOEXPOSURE_LEVEL[5][8]=
|
||||
{
|
||||
{
|
||||
0xFF,0x01,
|
||||
0x24,0x20,
|
||||
0x25,0x18,
|
||||
0x26,0x60,
|
||||
},
|
||||
{
|
||||
0xFF,0x01,
|
||||
0x24,0x34,
|
||||
0x25,0x1c,
|
||||
0x26,0x00,
|
||||
},
|
||||
{
|
||||
0xFF,0x01,
|
||||
0x24,0x3e,
|
||||
0x25,0x38,
|
||||
0x26,0x81,
|
||||
},
|
||||
{
|
||||
0xFF,0x01,
|
||||
0x24,0x48,
|
||||
0x25,0x40,
|
||||
0x26,0x81,
|
||||
},
|
||||
{
|
||||
0xFF,0x01,
|
||||
0x24,0x58,
|
||||
0x25,0x50,
|
||||
0x26,0x92,
|
||||
},
|
||||
};
|
||||
//OV2640自动曝光等级设置
|
||||
//level:0~4
|
||||
void OV2640_Auto_Exposure(uint8_t level)
|
||||
{
|
||||
uint8_t i;
|
||||
uint8_t *p=(uint8_t*)OV2640_AUTOEXPOSURE_LEVEL[level];
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
SCCB_WR_Reg(p[i*2],p[i*2+1]);
|
||||
}
|
||||
}
|
||||
//白平衡设置
|
||||
//0:自动
|
||||
//1:太阳sunny
|
||||
//2,阴天cloudy
|
||||
//3,办公室office
|
||||
//4,家里home
|
||||
void OV2640_Light_Mode(uint8_t mode)
|
||||
{
|
||||
uint8_t regccval=0X5E;//Sunny
|
||||
uint8_t regcdval=0X41;
|
||||
uint8_t regceval=0X54;
|
||||
switch(mode)
|
||||
{
|
||||
case 0://auto
|
||||
SCCB_WR_Reg(0XFF,0X00);
|
||||
SCCB_WR_Reg(0XC7,0X10);//AWB ON
|
||||
return;
|
||||
case 2://cloudy
|
||||
regccval=0X65;
|
||||
regcdval=0X41;
|
||||
regceval=0X4F;
|
||||
break;
|
||||
case 3://office
|
||||
regccval=0X52;
|
||||
regcdval=0X41;
|
||||
regceval=0X66;
|
||||
break;
|
||||
case 4://home
|
||||
regccval=0X42;
|
||||
regcdval=0X3F;
|
||||
regceval=0X71;
|
||||
break;
|
||||
}
|
||||
SCCB_WR_Reg(0XFF,0X00);
|
||||
SCCB_WR_Reg(0XC7,0X40); //AWB OFF
|
||||
SCCB_WR_Reg(0XCC,regccval);
|
||||
SCCB_WR_Reg(0XCD,regcdval);
|
||||
SCCB_WR_Reg(0XCE,regceval);
|
||||
}
|
||||
//色度设置
|
||||
//0:-2
|
||||
//1:-1
|
||||
//2,0
|
||||
//3,+1
|
||||
//4,+2
|
||||
void OV2640_Color_Saturation(uint8_t sat)
|
||||
{
|
||||
uint8_t reg7dval=((sat+2)<<4)|0X08;
|
||||
SCCB_WR_Reg(0XFF,0X00);
|
||||
SCCB_WR_Reg(0X7C,0X00);
|
||||
SCCB_WR_Reg(0X7D,0X02);
|
||||
SCCB_WR_Reg(0X7C,0X03);
|
||||
SCCB_WR_Reg(0X7D,reg7dval);
|
||||
SCCB_WR_Reg(0X7D,reg7dval);
|
||||
}
|
||||
//亮度设置
|
||||
//0:(0X00)-2
|
||||
//1:(0X10)-1
|
||||
//2,(0X20) 0
|
||||
//3,(0X30)+1
|
||||
//4,(0X40)+2
|
||||
void OV2640_Brightness(uint8_t bright)
|
||||
{
|
||||
SCCB_WR_Reg(0xff, 0x00);
|
||||
SCCB_WR_Reg(0x7c, 0x00);
|
||||
SCCB_WR_Reg(0x7d, 0x04);
|
||||
SCCB_WR_Reg(0x7c, 0x09);
|
||||
SCCB_WR_Reg(0x7d, bright<<4);
|
||||
SCCB_WR_Reg(0x7d, 0x00);
|
||||
}
|
||||
//对比度设置
|
||||
//0:-2
|
||||
//1:-1
|
||||
//2,0
|
||||
//3,+1
|
||||
//4,+2
|
||||
void OV2640_Contrast(uint8_t contrast)
|
||||
{
|
||||
uint8_t reg7d0val=0X20;//默认为普通模式
|
||||
uint8_t reg7d1val=0X20;
|
||||
switch(contrast)
|
||||
{
|
||||
case 0://-2
|
||||
reg7d0val=0X18;
|
||||
reg7d1val=0X34;
|
||||
break;
|
||||
case 1://-1
|
||||
reg7d0val=0X1C;
|
||||
reg7d1val=0X2A;
|
||||
break;
|
||||
case 3://1
|
||||
reg7d0val=0X24;
|
||||
reg7d1val=0X16;
|
||||
break;
|
||||
case 4://2
|
||||
reg7d0val=0X28;
|
||||
reg7d1val=0X0C;
|
||||
break;
|
||||
}
|
||||
SCCB_WR_Reg(0xff,0x00);
|
||||
SCCB_WR_Reg(0x7c,0x00);
|
||||
SCCB_WR_Reg(0x7d,0x04);
|
||||
SCCB_WR_Reg(0x7c,0x07);
|
||||
SCCB_WR_Reg(0x7d,0x20);
|
||||
SCCB_WR_Reg(0x7d,reg7d0val);
|
||||
SCCB_WR_Reg(0x7d,reg7d1val);
|
||||
SCCB_WR_Reg(0x7d,0x06);
|
||||
}
|
||||
//特效设置
|
||||
//0:普通模式
|
||||
//1,负片
|
||||
//2,黑白
|
||||
//3,偏红色
|
||||
//4,偏绿色
|
||||
//5,偏蓝色
|
||||
//6,复古
|
||||
void OV2640_Special_Effects(uint8_t eft)
|
||||
{
|
||||
uint8_t reg7d0val=0X00;//默认为普通模式
|
||||
uint8_t reg7d1val=0X80;
|
||||
uint8_t reg7d2val=0X80;
|
||||
switch(eft)
|
||||
{
|
||||
case 1://负片
|
||||
reg7d0val=0X40;
|
||||
break;
|
||||
case 2://黑白
|
||||
reg7d0val=0X18;
|
||||
break;
|
||||
case 3://偏红色
|
||||
reg7d0val=0X18;
|
||||
reg7d1val=0X40;
|
||||
reg7d2val=0XC0;
|
||||
break;
|
||||
case 4://偏绿色
|
||||
reg7d0val=0X18;
|
||||
reg7d1val=0X40;
|
||||
reg7d2val=0X40;
|
||||
break;
|
||||
case 5://偏蓝色
|
||||
reg7d0val=0X18;
|
||||
reg7d1val=0XA0;
|
||||
reg7d2val=0X40;
|
||||
break;
|
||||
case 6://复古
|
||||
reg7d0val=0X18;
|
||||
reg7d1val=0X40;
|
||||
reg7d2val=0XA6;
|
||||
break;
|
||||
}
|
||||
SCCB_WR_Reg(0xff,0x00);
|
||||
SCCB_WR_Reg(0x7c,0x00);
|
||||
SCCB_WR_Reg(0x7d,reg7d0val);
|
||||
SCCB_WR_Reg(0x7c,0x05);
|
||||
SCCB_WR_Reg(0x7d,reg7d1val);
|
||||
SCCB_WR_Reg(0x7d,reg7d2val);
|
||||
}
|
||||
//彩条测试
|
||||
//sw:0,关闭彩条
|
||||
// 1,开启彩条(注意OV2640的彩条是叠加在图像上面的)
|
||||
void OV2640_Color_Bar(uint8_t sw)
|
||||
{
|
||||
uint8_t reg;
|
||||
SCCB_WR_Reg(0XFF,0X01);
|
||||
reg=SCCB_RD_Reg(0X12);
|
||||
reg&=~(1<<1);
|
||||
if(sw)reg|=1<<1;
|
||||
SCCB_WR_Reg(0X12,reg);
|
||||
}
|
||||
//设置图像输出窗口
|
||||
//sx,sy,起始地址
|
||||
//width,height:宽度(对应:horizontal)和高度(对应:vertical)
|
||||
void OV2640_Window_Set(uint16_t sx,uint16_t sy,uint16_t width,uint16_t height)
|
||||
{
|
||||
uint16_t endx;
|
||||
uint16_t endy;
|
||||
uint8_t temp;
|
||||
endx=sx+width/2; //V*2
|
||||
endy=sy+height/2;
|
||||
|
||||
SCCB_WR_Reg(0XFF,0X01);
|
||||
temp=SCCB_RD_Reg(0X03); //读取Vref之前的值
|
||||
temp&=0XF0;
|
||||
temp|=((endy&0X03)<<2)|(sy&0X03);
|
||||
SCCB_WR_Reg(0X03,temp); //设置Vref的start和end的最低2位
|
||||
SCCB_WR_Reg(0X19,sy>>2); //设置Vref的start高8位
|
||||
SCCB_WR_Reg(0X1A,endy>>2); //设置Vref的end的高8位
|
||||
|
||||
temp=SCCB_RD_Reg(0X32); //读取Href之前的值
|
||||
temp&=0XC0;
|
||||
temp|=((endx&0X07)<<3)|(sx&0X07);
|
||||
SCCB_WR_Reg(0X32,temp); //设置Href的start和end的最低3位
|
||||
SCCB_WR_Reg(0X17,sx>>3); //设置Href的start高8位
|
||||
SCCB_WR_Reg(0X18,endx>>3); //设置Href的end的高8位
|
||||
}
|
||||
//设置图像输出大小
|
||||
//OV2640输出图像的大小(分辨率),完全由改函数确定
|
||||
//width,height:宽度(对应:horizontal)和高度(对应:vertical),width和height必须是4的倍数
|
||||
//返回值:0,设置成功
|
||||
// 其他,设置失败
|
||||
uint8_t OV2640_OutSize_Set(uint16_t width,uint16_t height)
|
||||
{
|
||||
uint16_t outh;
|
||||
uint16_t outw;
|
||||
uint8_t temp;
|
||||
if(width%4)return 1;
|
||||
if(height%4)return 2;
|
||||
outw=width/4;
|
||||
outh=height/4;
|
||||
SCCB_WR_Reg(0XFF,0X00);
|
||||
SCCB_WR_Reg(0XE0,0X04);
|
||||
SCCB_WR_Reg(0X5A,outw&0XFF); //设置OUTW的低八位
|
||||
SCCB_WR_Reg(0X5B,outh&0XFF); //设置OUTH的低八位
|
||||
temp=(outw>>8)&0X03;
|
||||
temp|=(outh>>6)&0X04;
|
||||
SCCB_WR_Reg(0X5C,temp); //设置OUTH/OUTW的高位
|
||||
SCCB_WR_Reg(0XE0,0X00);
|
||||
return 0;
|
||||
}
|
||||
//设置图像开窗大小
|
||||
//由:OV2640_ImageSize_Set确定传感器输出分辨率从大小.
|
||||
//该函数则在这个范围上面进行开窗,用于OV2640_OutSize_Set的输出
|
||||
//注意:本函数的宽度和高度,必须大于等于OV2640_OutSize_Set函数的宽度和高度
|
||||
// OV2640_OutSize_Set设置的宽度和高度,根据本函数设置的宽度和高度,由DSP
|
||||
// 自动计算缩放比例,输出给外部设备.
|
||||
//width,height:宽度(对应:horizontal)和高度(对应:vertical),width和height必须是4的倍数
|
||||
//返回值:0,设置成功
|
||||
// 其他,设置失败
|
||||
uint8_t OV2640_ImageWin_Set(uint16_t offx,uint16_t offy,uint16_t width,uint16_t height)
|
||||
{
|
||||
uint16_t hsize;
|
||||
uint16_t vsize;
|
||||
uint8_t temp;
|
||||
if(width%4)return 1;
|
||||
if(height%4)return 2;
|
||||
hsize=width/4;
|
||||
vsize=height/4;
|
||||
SCCB_WR_Reg(0XFF,0X00);
|
||||
SCCB_WR_Reg(0XE0,0X04);
|
||||
SCCB_WR_Reg(0X51,hsize&0XFF); //设置H_SIZE的低八位
|
||||
SCCB_WR_Reg(0X52,vsize&0XFF); //设置V_SIZE的低八位
|
||||
SCCB_WR_Reg(0X53,offx&0XFF); //设置offx的低八位
|
||||
SCCB_WR_Reg(0X54,offy&0XFF); //设置offy的低八位
|
||||
temp=(vsize>>1)&0X80;
|
||||
temp|=(offy>>4)&0X70;
|
||||
temp|=(hsize>>5)&0X08;
|
||||
temp|=(offx>>8)&0X07;
|
||||
SCCB_WR_Reg(0X55,temp); //设置H_SIZE/V_SIZE/OFFX,OFFY的高位
|
||||
SCCB_WR_Reg(0X57,(hsize>>2)&0X80); //设置H_SIZE/V_SIZE/OFFX,OFFY的高位
|
||||
SCCB_WR_Reg(0XE0,0X00);
|
||||
return 0;
|
||||
}
|
||||
//该函数设置图像尺寸大小,也就是所选格式的输出分辨率
|
||||
//UXGA:1600*1200,SVGA:800*600,CIF:352*288
|
||||
//width,height:图像宽度和图像高度
|
||||
//返回值:0,设置成功
|
||||
// 其他,设置失败
|
||||
uint8_t OV2640_ImageSize_Set(uint16_t width,uint16_t height)
|
||||
{
|
||||
uint8_t temp;
|
||||
SCCB_WR_Reg(0XFF,0X00);
|
||||
SCCB_WR_Reg(0XE0,0X04);
|
||||
SCCB_WR_Reg(0XC0,(width)>>3&0XFF); //设置HSIZE的10:3位
|
||||
SCCB_WR_Reg(0XC1,(height)>>3&0XFF); //设置VSIZE的10:3位
|
||||
temp=(width&0X07)<<3;
|
||||
temp|=height&0X07;
|
||||
temp|=(width>>4)&0X80;
|
||||
SCCB_WR_Reg(0X8C,temp);
|
||||
SCCB_WR_Reg(0XE0,0X00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
167
board/NUCLEO_STM32L496ZG/BSP/Hardware/Src/sccb.c
Normal file
@@ -0,0 +1,167 @@
|
||||
#include "sys.h"
|
||||
#include "sccb.h"
|
||||
#include "stdio.h"
|
||||
#include "delay.h"
|
||||
|
||||
void SCCB_SCL(uint8_t sccb_scl)
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_4, (GPIO_PinState)sccb_scl);
|
||||
}
|
||||
|
||||
void SCCB_SDA(uint8_t sccb_sda)
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, (GPIO_PinState)sccb_sda);
|
||||
}
|
||||
|
||||
uint8_t SCCB_READ_SDA()
|
||||
{
|
||||
uint8_t sccb_sda = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_5);
|
||||
return sccb_sda;
|
||||
}
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC>SCCB<43>ӿ<EFBFBD>
|
||||
void SCCB_Init(void)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE(); //ʹ<><CAB9>GPIOBʱ<42><CAB1>
|
||||
//GPIOF9,F10<31><30>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStructure.Pin = GPIO_PIN_4|GPIO_PIN_5;//PB4,5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; //PB4,5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
GPIO_InitStructure.Speed = GPIO_SPEED_FAST;//100MHz
|
||||
GPIO_InitStructure.Pull = GPIO_PULLUP;//<2F><><EFBFBD><EFBFBD>
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStructure);//<2F><>ʼ<EFBFBD><CABC>
|
||||
SCCB_SDA_OUT();
|
||||
}
|
||||
|
||||
//SCCB<43><42>ʼ<EFBFBD>ź<EFBFBD>
|
||||
//<2F><>ʱ<EFBFBD><CAB1>Ϊ<EFBFBD>ߵ<EFBFBD>ʱ<EFBFBD><CAB1>,<2C><><EFBFBD><EFBFBD><EFBFBD>ߵĸߵ<C4B8><DFB5><EFBFBD>,ΪSCCB<43><42>ʼ<EFBFBD>ź<EFBFBD>
|
||||
//<2F>ڼ<EFBFBD><DABC><EFBFBD>״̬<D7B4><CCAC>,SDA<44><41>SCL<43><4C>Ϊ<EFBFBD>͵<EFBFBD>ƽ
|
||||
void SCCB_Start(void)
|
||||
{
|
||||
SCCB_SDA(1); //<2F><><EFBFBD><EFBFBD><EFBFBD>߸ߵ<DFB8>ƽ
|
||||
SCCB_SCL(1); //<2F><>ʱ<EFBFBD><CAB1><EFBFBD>߸ߵ<DFB8>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɸ<EFBFBD><C9B8><EFBFBD><EFBFBD><EFBFBD>
|
||||
delay_us(50);
|
||||
SCCB_SDA(0);
|
||||
delay_us(50);
|
||||
SCCB_SCL(0); //<2F><><EFBFBD><EFBFBD><EFBFBD>ָ<DFBB><D6B8>͵<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ
|
||||
}
|
||||
|
||||
//SCCBֹͣ<CDA3>ź<EFBFBD>
|
||||
//<2F><>ʱ<EFBFBD><CAB1>Ϊ<EFBFBD>ߵ<EFBFBD>ʱ<EFBFBD><CAB1>,<2C><><EFBFBD><EFBFBD><EFBFBD>ߵĵ͵<C4B5><CDB5><EFBFBD>,ΪSCCBֹͣ<CDA3>ź<EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD>״<EFBFBD><D7B4><EFBFBD><EFBFBD>,SDA,SCL<43><4C>Ϊ<EFBFBD>ߵ<EFBFBD>ƽ
|
||||
void SCCB_Stop(void)
|
||||
{
|
||||
SCCB_SDA(0);
|
||||
delay_us(50);
|
||||
SCCB_SCL(1);
|
||||
delay_us(50);
|
||||
SCCB_SDA(1);
|
||||
delay_us(50);
|
||||
}
|
||||
//<2F><><EFBFBD><EFBFBD>NA<4E>ź<EFBFBD>
|
||||
void SCCB_No_Ack(void)
|
||||
{
|
||||
delay_us(50);
|
||||
SCCB_SDA(1);
|
||||
SCCB_SCL(1);
|
||||
delay_us(50);
|
||||
SCCB_SCL(0);
|
||||
delay_us(50);
|
||||
SCCB_SDA(0);
|
||||
delay_us(50);
|
||||
}
|
||||
//SCCB,д<><D0B4>һ<EFBFBD><D2BB><EFBFBD>ֽ<EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD>ֵ:0,<2C>ɹ<EFBFBD>;1,ʧ<><CAA7>.
|
||||
uint8_t SCCB_WR_Byte(uint8_t dat)
|
||||
{
|
||||
uint8_t j,res;
|
||||
for(j=0;j<8;j++) //ѭ<><D1AD>8<EFBFBD>η<EFBFBD><CEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
if(dat&0x80)SCCB_SDA(1);
|
||||
else SCCB_SDA(0);
|
||||
dat<<=1;
|
||||
delay_us(50);
|
||||
SCCB_SCL(1);
|
||||
delay_us(50);
|
||||
SCCB_SCL(0);
|
||||
}
|
||||
SCCB_SDA_IN(); //<2F><><EFBFBD><EFBFBD>SDAΪ<41><CEAA><EFBFBD><EFBFBD>
|
||||
delay_us(50);
|
||||
SCCB_SCL(1); //<2F><><EFBFBD>յھ<D5B5>λ,<2C><><EFBFBD>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ͳɹ<CDB3>
|
||||
delay_us(50);
|
||||
if(SCCB_READ_SDA())res=1; //SDA=1<><31><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD>1
|
||||
else res=0; //SDA=0<><30><EFBFBD>ͳɹ<CDB3><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
|
||||
SCCB_SCL(0);
|
||||
SCCB_SDA_OUT(); //<2F><><EFBFBD><EFBFBD>SDAΪ<41><CEAA><EFBFBD><EFBFBD>
|
||||
return res;
|
||||
}
|
||||
//SCCB <20><>ȡһ<C8A1><D2BB><EFBFBD>ֽ<EFBFBD>
|
||||
//<2F><>SCL<43><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD>ֵ:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
uint8_t SCCB_RD_Byte(void)
|
||||
{
|
||||
uint8_t temp=0,j;
|
||||
SCCB_SDA_IN(); //<2F><><EFBFBD><EFBFBD>SDAΪ<41><CEAA><EFBFBD><EFBFBD>
|
||||
for(j=8;j>0;j--) //ѭ<><D1AD>8<EFBFBD>ν<EFBFBD><CEBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
delay_us(50);
|
||||
SCCB_SCL(1);
|
||||
temp=temp<<1;
|
||||
if(SCCB_READ_SDA())temp++;
|
||||
delay_us(50);
|
||||
SCCB_SCL(0);
|
||||
}
|
||||
SCCB_SDA_OUT(); //<2F><><EFBFBD><EFBFBD>SDAΪ<41><CEAA><EFBFBD><EFBFBD>
|
||||
return temp;
|
||||
}
|
||||
//д<>Ĵ<EFBFBD><C4B4><EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD>ֵ:0,<2C>ɹ<EFBFBD>;1,ʧ<><CAA7>.
|
||||
uint8_t SCCB_WR_Reg(uint8_t reg,uint8_t data)
|
||||
{
|
||||
uint8_t res=0;
|
||||
SCCB_Start(); //<2F><><EFBFBD><EFBFBD>SCCB<43><42><EFBFBD><EFBFBD>
|
||||
if(SCCB_WR_Byte(SCCB_ID)){
|
||||
res=1; //д<><D0B4><EFBFBD><EFBFBD>ID
|
||||
}
|
||||
delay_us(100);
|
||||
if(SCCB_WR_Byte(reg))res=1; //д<>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ
|
||||
delay_us(100);
|
||||
if(SCCB_WR_Byte(data))res=1; //д<><D0B4><EFBFBD><EFBFBD>
|
||||
SCCB_Stop();
|
||||
return res;
|
||||
}
|
||||
//<2F><><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD>ֵ:<3A><><EFBFBD><EFBFBD><EFBFBD>ļĴ<C4BC><C4B4><EFBFBD>ֵ
|
||||
uint8_t SCCB_RD_Reg(uint8_t reg)
|
||||
{
|
||||
uint8_t val=0;
|
||||
SCCB_Start(); //<2F><><EFBFBD><EFBFBD>SCCB<43><42><EFBFBD><EFBFBD>
|
||||
SCCB_WR_Byte(SCCB_ID); //д<><D0B4><EFBFBD><EFBFBD>ID
|
||||
delay_us(100);
|
||||
SCCB_WR_Byte(reg); //д<>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ
|
||||
delay_us(100);
|
||||
SCCB_Stop();
|
||||
delay_us(100);
|
||||
//<2F><><EFBFBD>üĴ<C3BC><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><F3A3ACB2>Ƕ<EFBFBD>
|
||||
SCCB_Start();
|
||||
SCCB_WR_Byte(SCCB_ID|0X01); //<2F><><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD>
|
||||
delay_us(100);
|
||||
val=SCCB_RD_Byte(); //<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
SCCB_No_Ack();
|
||||
SCCB_Stop();
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
58
board/NUCLEO_STM32L496ZG/BSP/Inc/dcmi.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : DCMI.h
|
||||
* Description : This file provides code for the configuration
|
||||
* of the DCMI instances.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __dcmi_H
|
||||
#define __dcmi_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "main.h"
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
extern DCMI_HandleTypeDef hdcmi;
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_DCMI_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
/* USER CODE END Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*__ dcmi_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
56
board/NUCLEO_STM32L496ZG/BSP/Inc/dma.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : dma.h
|
||||
* Description : This file contains all the function prototypes for
|
||||
* the dma.c file
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __dma_H
|
||||
#define __dma_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "main.h"
|
||||
|
||||
/* DMA memory to memory transfer handles -------------------------------------*/
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_DMA_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
/* USER CODE END Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __dma_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : gpio.h
|
||||
* Description : This file contains all the functions prototypes for
|
||||
* the gpio
|
||||
* Description : This file contains all the functions prototypes for
|
||||
* the gpio
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2019 STMicroelectronics.
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
|
58
board/NUCLEO_STM32L496ZG/BSP/Inc/i2c.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : I2C.h
|
||||
* Description : This file provides code for the configuration
|
||||
* of the I2C instances.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __i2c_H
|
||||
#define __i2c_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "main.h"
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
extern I2C_HandleTypeDef hi2c1;
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_I2C1_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
/* USER CODE END Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*__ i2c_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@@ -60,20 +60,34 @@ void Error_Handler(void);
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define B1_Pin GPIO_PIN_13
|
||||
#define B1_GPIO_Port GPIOC
|
||||
#define LD3_Pin GPIO_PIN_14
|
||||
#define LD3_GPIO_Port GPIOB
|
||||
#define LCD_CLK_Pin GPIO_PIN_5
|
||||
#define LCD_CLK_GPIO_Port GPIOA
|
||||
#define LCD_DIN_Pin GPIO_PIN_7
|
||||
#define LCD_DIN_GPIO_Port GPIOA
|
||||
#define LCD_DC_Pin GPIO_PIN_12
|
||||
#define LCD_DC_GPIO_Port GPIOB
|
||||
#define LED_Pin GPIO_PIN_14
|
||||
#define LED_GPIO_Port GPIOB
|
||||
#define USB_OverCurrent_Pin GPIO_PIN_5
|
||||
#define USB_OverCurrent_GPIO_Port GPIOG
|
||||
#define USB_PowerSwitchOn_Pin GPIO_PIN_6
|
||||
#define USB_PowerSwitchOn_GPIO_Port GPIOG
|
||||
#define STLK_RX_Pin GPIO_PIN_7
|
||||
#define STLK_RX_GPIO_Port GPIOG
|
||||
#define STLK_TX_Pin GPIO_PIN_8
|
||||
#define STLK_TX_GPIO_Port GPIOG
|
||||
#define LCD_RST_Pin GPIO_PIN_11
|
||||
#define LCD_RST_GPIO_Port GPIOA
|
||||
#define LCD_CS_Pin GPIO_PIN_12
|
||||
#define LCD_CS_GPIO_Port GPIOA
|
||||
#define TMS_Pin GPIO_PIN_13
|
||||
#define TMS_GPIO_Port GPIOA
|
||||
#define TCK_Pin GPIO_PIN_14
|
||||
#define TCK_GPIO_Port GPIOA
|
||||
#define SWO_Pin GPIO_PIN_3
|
||||
#define SWO_GPIO_Port GPIOB
|
||||
#define LD2_Pin GPIO_PIN_7
|
||||
#define LD2_GPIO_Port GPIOB
|
||||
#define LCD_BL_Pin GPIO_PIN_6
|
||||
#define LCD_BL_GPIO_Port GPIOB
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
@@ -8,8 +8,14 @@
|
||||
#include "stm32l4xx_hal.h"
|
||||
#include "usart.h"
|
||||
#include "gpio.h"
|
||||
#include "dcmi.h"
|
||||
#include "dma.h"
|
||||
#include "i2c.h"
|
||||
#include "spi.h"
|
||||
#include "tim.h"
|
||||
#include "ov2640.h"
|
||||
#include "lcd_2inch4.h"
|
||||
#include "tos_k.h"
|
||||
|
||||
void board_init(void);
|
||||
void SystemClock_Config(void);
|
||||
|
||||
|
58
board/NUCLEO_STM32L496ZG/BSP/Inc/spi.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : SPI.h
|
||||
* Description : This file provides code for the configuration
|
||||
* of the SPI instances.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __spi_H
|
||||
#define __spi_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "main.h"
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
extern SPI_HandleTypeDef hspi1;
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_SPI1_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
/* USER CODE END Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*__ spi_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32l4xx_hal_conf.h
|
||||
* @brief HAL configuration file.
|
||||
* @brief HAL configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2019 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2020 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
@@ -30,7 +30,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32L4xx_HAL_CONF_H
|
||||
@@ -45,10 +45,10 @@
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_MODULE_ENABLED
|
||||
/*#define HAL_ADC_MODULE_ENABLED */
|
||||
/*#define HAL_CRYP_MODULE_ENABLED */
|
||||
/*#define HAL_CAN_MODULE_ENABLED */
|
||||
@@ -56,7 +56,7 @@
|
||||
/*#define HAL_CRC_MODULE_ENABLED */
|
||||
/*#define HAL_CRYP_MODULE_ENABLED */
|
||||
/*#define HAL_DAC_MODULE_ENABLED */
|
||||
/*#define HAL_DCMI_MODULE_ENABLED */
|
||||
#define HAL_DCMI_MODULE_ENABLED
|
||||
/*#define HAL_DMA2D_MODULE_ENABLED */
|
||||
/*#define HAL_DFSDM_MODULE_ENABLED */
|
||||
/*#define HAL_DSI_MODULE_ENABLED */
|
||||
@@ -85,17 +85,17 @@
|
||||
/*#define HAL_SD_MODULE_ENABLED */
|
||||
/*#define HAL_SMBUS_MODULE_ENABLED */
|
||||
/*#define HAL_SMARTCARD_MODULE_ENABLED */
|
||||
/*#define HAL_SPI_MODULE_ENABLED */
|
||||
#define HAL_SPI_MODULE_ENABLED
|
||||
/*#define HAL_SRAM_MODULE_ENABLED */
|
||||
/*#define HAL_SWPMI_MODULE_ENABLED */
|
||||
/*#define HAL_TIM_MODULE_ENABLED */
|
||||
#define HAL_TIM_MODULE_ENABLED
|
||||
/*#define HAL_TSC_MODULE_ENABLED */
|
||||
#define HAL_UART_MODULE_ENABLED
|
||||
/*#define HAL_USART_MODULE_ENABLED */
|
||||
/*#define HAL_WWDG_MODULE_ENABLED */
|
||||
/*#define HAL_EXTI_MODULE_ENABLED */
|
||||
#define HAL_GPIO_MODULE_ENABLED
|
||||
#define HAL_EXTI_MODULE_ENABLED
|
||||
#define HAL_EXTI_MODULE_ENABLED
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
#define HAL_DMA_MODULE_ENABLED
|
||||
#define HAL_RCC_MODULE_ENABLED
|
||||
@@ -107,9 +107,9 @@
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
|
||||
#endif /* HSE_VALUE */
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
|
||||
@@ -140,7 +140,7 @@
|
||||
* When the CRS is not used, the HSI48 RC oscillator runs on it default frequency
|
||||
* which is subject to manufacturing process variations.
|
||||
*/
|
||||
#if !defined (HSI48_VALUE)
|
||||
#if !defined (HSI48_VALUE)
|
||||
#define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz.
|
||||
The real value my vary depending on manufacturing process variations.*/
|
||||
#endif /* HSI48_VALUE */
|
||||
@@ -148,7 +148,7 @@
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/
|
||||
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
|
||||
The real value may vary depending on the variations
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
/**
|
||||
* @brief External clock source for SAI1 peripheral
|
||||
* This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
|
||||
* This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
|
||||
* frequency.
|
||||
*/
|
||||
#if !defined (EXTERNAL_SAI1_CLOCK_VALUE)
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
/**
|
||||
* @brief External clock source for SAI2 peripheral
|
||||
* This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
|
||||
* This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
|
||||
* frequency.
|
||||
*/
|
||||
#if !defined (EXTERNAL_SAI2_CLOCK_VALUE)
|
||||
@@ -190,18 +190,18 @@
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
*/
|
||||
|
||||
#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */
|
||||
#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */
|
||||
#define USE_RTOS 0U
|
||||
*/
|
||||
|
||||
#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */
|
||||
#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */
|
||||
#define USE_RTOS 0U
|
||||
#define PREFETCH_ENABLE 0U
|
||||
#define INSTRUCTION_CACHE_ENABLE 1U
|
||||
#define DATA_CACHE_ENABLE 1U
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1U */
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
@@ -56,6 +56,8 @@ void SVC_Handler(void);
|
||||
void DebugMon_Handler(void);
|
||||
void PendSV_Handler(void);
|
||||
void SysTick_Handler(void);
|
||||
void DMA2_Channel6_IRQHandler(void);
|
||||
void DCMI_IRQHandler(void);
|
||||
/* USER CODE BEGIN EFP */
|
||||
|
||||
/* USER CODE END EFP */
|
||||
|
60
board/NUCLEO_STM32L496ZG/BSP/Inc/tim.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : TIM.h
|
||||
* Description : This file provides code for the configuration
|
||||
* of the TIM instances.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __tim_H
|
||||
#define __tim_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "main.h"
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
extern TIM_HandleTypeDef htim4;
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_TIM4_Init(void);
|
||||
|
||||
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
/* USER CODE END Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*__ tim_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@@ -6,7 +6,7 @@
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2019 STMicroelectronics.
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
@@ -44,6 +44,7 @@ void MX_USART1_UART_Init(void);
|
||||
void MX_USART2_UART_Init(void);
|
||||
void MX_USART3_UART_Init(void);
|
||||
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
/* USER CODE END Prototypes */
|
||||
|
208
board/NUCLEO_STM32L496ZG/BSP/Src/dcmi.c
Normal file
@@ -0,0 +1,208 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : DCMI.c
|
||||
* Description : This file provides code for the configuration
|
||||
* of the DCMI instances.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "dcmi.h"
|
||||
|
||||
/* USER CODE BEGIN 0 */
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
DCMI_HandleTypeDef hdcmi;
|
||||
DMA_HandleTypeDef hdma_dcmi;
|
||||
|
||||
/* DCMI init function */
|
||||
void MX_DCMI_Init(void)
|
||||
{
|
||||
|
||||
hdcmi.Instance = DCMI;
|
||||
hdcmi.Init.SynchroMode = DCMI_SYNCHRO_HARDWARE;
|
||||
hdcmi.Init.PCKPolarity = DCMI_PCKPOLARITY_RISING;
|
||||
hdcmi.Init.VSPolarity = DCMI_VSPOLARITY_LOW;
|
||||
hdcmi.Init.HSPolarity = DCMI_HSPOLARITY_LOW;
|
||||
hdcmi.Init.CaptureRate = DCMI_CR_ALL_FRAME;
|
||||
hdcmi.Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B;
|
||||
hdcmi.Init.JPEGMode = DCMI_JPEG_ENABLE;
|
||||
hdcmi.Init.ByteSelectMode = DCMI_BSM_ALL;
|
||||
hdcmi.Init.ByteSelectStart = DCMI_OEBS_ODD;
|
||||
hdcmi.Init.LineSelectMode = DCMI_LSM_ALL;
|
||||
hdcmi.Init.LineSelectStart = DCMI_OELS_ODD;
|
||||
if (HAL_DCMI_Init(&hdcmi) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HAL_DCMI_MspInit(DCMI_HandleTypeDef* dcmiHandle)
|
||||
{
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
if(dcmiHandle->Instance==DCMI)
|
||||
{
|
||||
/* USER CODE BEGIN DCMI_MspInit 0 */
|
||||
|
||||
/* USER CODE END DCMI_MspInit 0 */
|
||||
/* DCMI clock enable */
|
||||
__HAL_RCC_DCMI_CLK_ENABLE();
|
||||
|
||||
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
/**DCMI GPIO Configuration
|
||||
PE4 ------> DCMI_D4
|
||||
PE5 ------> DCMI_D6
|
||||
PE6 ------> DCMI_D7
|
||||
PA4 ------> DCMI_HSYNC
|
||||
PD9 ------> DCMI_PIXCLK
|
||||
PC6 ------> DCMI_D0
|
||||
PC7 ------> DCMI_D1
|
||||
PC8 ------> DCMI_D2
|
||||
PC9 ------> DCMI_D3
|
||||
PD3 ------> DCMI_D5
|
||||
PB7 ------> DCMI_VSYNC
|
||||
*/
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF10_DCMI;
|
||||
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_4;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF10_DCMI;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_9;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF10_DCMI;
|
||||
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF10_DCMI;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_9;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF4_DCMI;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_3;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF4_DCMI;
|
||||
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_7;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF10_DCMI;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
/* DCMI DMA Init */
|
||||
/* DCMI Init */
|
||||
hdma_dcmi.Instance = DMA2_Channel6;
|
||||
hdma_dcmi.Init.Request = DMA_REQUEST_0;
|
||||
hdma_dcmi.Init.Direction = DMA_PERIPH_TO_MEMORY;
|
||||
hdma_dcmi.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||
hdma_dcmi.Init.MemInc = DMA_MINC_ENABLE;
|
||||
hdma_dcmi.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
|
||||
hdma_dcmi.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
|
||||
hdma_dcmi.Init.Mode = DMA_CIRCULAR;
|
||||
hdma_dcmi.Init.Priority = DMA_PRIORITY_HIGH;
|
||||
if (HAL_DMA_Init(&hdma_dcmi) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
__HAL_LINKDMA(dcmiHandle,DMA_Handle,hdma_dcmi);
|
||||
|
||||
/* DCMI interrupt Init */
|
||||
HAL_NVIC_SetPriority(DCMI_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(DCMI_IRQn);
|
||||
/* USER CODE BEGIN DCMI_MspInit 1 */
|
||||
|
||||
/* USER CODE END DCMI_MspInit 1 */
|
||||
}
|
||||
}
|
||||
|
||||
void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* dcmiHandle)
|
||||
{
|
||||
|
||||
if(dcmiHandle->Instance==DCMI)
|
||||
{
|
||||
/* USER CODE BEGIN DCMI_MspDeInit 0 */
|
||||
|
||||
/* USER CODE END DCMI_MspDeInit 0 */
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_DCMI_CLK_DISABLE();
|
||||
|
||||
/**DCMI GPIO Configuration
|
||||
PE4 ------> DCMI_D4
|
||||
PE5 ------> DCMI_D6
|
||||
PE6 ------> DCMI_D7
|
||||
PA4 ------> DCMI_HSYNC
|
||||
PD9 ------> DCMI_PIXCLK
|
||||
PC6 ------> DCMI_D0
|
||||
PC7 ------> DCMI_D1
|
||||
PC8 ------> DCMI_D2
|
||||
PC9 ------> DCMI_D3
|
||||
PD3 ------> DCMI_D5
|
||||
PB7 ------> DCMI_VSYNC
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOE, GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6);
|
||||
|
||||
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_4);
|
||||
|
||||
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_9|GPIO_PIN_3);
|
||||
|
||||
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9);
|
||||
|
||||
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_7);
|
||||
|
||||
/* DCMI DMA DeInit */
|
||||
HAL_DMA_DeInit(dcmiHandle->DMA_Handle);
|
||||
|
||||
/* DCMI interrupt Deinit */
|
||||
HAL_NVIC_DisableIRQ(DCMI_IRQn);
|
||||
/* USER CODE BEGIN DCMI_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END DCMI_MspDeInit 1 */
|
||||
}
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
63
board/NUCLEO_STM32L496ZG/BSP/Src/dma.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : dma.c
|
||||
* Description : This file provides code for the configuration
|
||||
* of all the requested memory to memory DMA transfers.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "dma.h"
|
||||
|
||||
/* USER CODE BEGIN 0 */
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Configure DMA */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/**
|
||||
* Enable DMA controller clock
|
||||
*/
|
||||
void MX_DMA_Init(void)
|
||||
{
|
||||
|
||||
/* DMA controller clock enable */
|
||||
__HAL_RCC_DMA2_CLK_ENABLE();
|
||||
|
||||
/* DMA interrupt init */
|
||||
/* DMA2_Channel6_IRQn interrupt configuration */
|
||||
HAL_NVIC_SetPriority(DMA2_Channel6_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(DMA2_Channel6_IRQn);
|
||||
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@@ -6,7 +6,7 @@
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2019 STMicroelectronics.
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
@@ -30,9 +30,9 @@
|
||||
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/** Configure pins as
|
||||
* Analog
|
||||
* Input
|
||||
/** Configure pins as
|
||||
* Analog
|
||||
* Input
|
||||
* Output
|
||||
* EVENT_OUT
|
||||
* EXTI
|
||||
@@ -43,30 +43,33 @@ void MX_GPIO_Init(void)
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
|
||||
/* GPIO Ports Clock Enable */
|
||||
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOH_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOG_CLK_ENABLE();
|
||||
HAL_PWREx_EnableVddIO2();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOB, LD3_Pin|LD2_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12|GPIO_PIN_14, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin : PtPin */
|
||||
GPIO_InitStruct.Pin = B1_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11|GPIO_PIN_12, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pins : PBPin PBPin */
|
||||
GPIO_InitStruct.Pin = LD3_Pin|LD2_Pin;
|
||||
/*Configure GPIO pins : PB12 PB14 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_14;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : PA11 PA12 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
}
|
||||
|
||||
|
121
board/NUCLEO_STM32L496ZG/BSP/Src/i2c.c
Normal file
@@ -0,0 +1,121 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : I2C.c
|
||||
* Description : This file provides code for the configuration
|
||||
* of the I2C instances.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "i2c.h"
|
||||
|
||||
/* USER CODE BEGIN 0 */
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
I2C_HandleTypeDef hi2c1;
|
||||
|
||||
/* I2C1 init function */
|
||||
void MX_I2C1_Init(void)
|
||||
{
|
||||
|
||||
hi2c1.Instance = I2C1;
|
||||
hi2c1.Init.Timing = 0x10909CEC;
|
||||
hi2c1.Init.OwnAddress1 = 0;
|
||||
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
|
||||
hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
|
||||
hi2c1.Init.OwnAddress2 = 0;
|
||||
hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
|
||||
hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
|
||||
hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
|
||||
if (HAL_I2C_Init(&hi2c1) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
/** Configure Analogue filter
|
||||
*/
|
||||
if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
/** Configure Digital filter
|
||||
*/
|
||||
if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1, 0) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HAL_I2C_MspInit(I2C_HandleTypeDef* i2cHandle)
|
||||
{
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
if(i2cHandle->Instance==I2C1)
|
||||
{
|
||||
/* USER CODE BEGIN I2C1_MspInit 0 */
|
||||
|
||||
/* USER CODE END I2C1_MspInit 0 */
|
||||
|
||||
__HAL_RCC_GPIOG_CLK_ENABLE();
|
||||
HAL_PWREx_EnableVddIO2();
|
||||
/**I2C1 GPIO Configuration
|
||||
PG13 ------> I2C1_SDA
|
||||
PG14 ------> I2C1_SCL
|
||||
*/
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
|
||||
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
|
||||
|
||||
/* I2C1 clock enable */
|
||||
__HAL_RCC_I2C1_CLK_ENABLE();
|
||||
/* USER CODE BEGIN I2C1_MspInit 1 */
|
||||
|
||||
/* USER CODE END I2C1_MspInit 1 */
|
||||
}
|
||||
}
|
||||
|
||||
void HAL_I2C_MspDeInit(I2C_HandleTypeDef* i2cHandle)
|
||||
{
|
||||
|
||||
if(i2cHandle->Instance==I2C1)
|
||||
{
|
||||
/* USER CODE BEGIN I2C1_MspDeInit 0 */
|
||||
|
||||
/* USER CODE END I2C1_MspDeInit 0 */
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_I2C1_CLK_DISABLE();
|
||||
|
||||
/**I2C1 GPIO Configuration
|
||||
PG13 ------> I2C1_SDA
|
||||
PG14 ------> I2C1_SCL
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_13);
|
||||
|
||||
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_14);
|
||||
|
||||
/* USER CODE BEGIN I2C1_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END I2C1_MspDeInit 1 */
|
||||
}
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@@ -18,8 +18,8 @@ int main(void)
|
||||
{
|
||||
board_init();
|
||||
printf("Welcome to TencentOS tiny\r\n");
|
||||
person_detect_init();
|
||||
osKernelInitialize(); // TOS Tiny kernel initialize
|
||||
osThreadCreate(osThread(application_entry), NULL); // Create TOS Tiny task
|
||||
osKernelStart(); // Start TOS Tiny
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,12 @@
|
||||
#include "mcu_init.h"
|
||||
|
||||
uint16_t camera_buffer[OV2640_PIXEL_WIDTH*OV2640_PIXEL_HEIGHT];
|
||||
uint8_t frame_flag = 0;
|
||||
uint8_t tensor_flag = 0;
|
||||
|
||||
extern DCMI_HandleTypeDef hdcmi;
|
||||
|
||||
|
||||
int fputc(int ch, FILE *f)
|
||||
{
|
||||
if (ch == '\n') {
|
||||
@@ -29,9 +36,24 @@ void board_init(void)
|
||||
HAL_Init();
|
||||
SystemClock_Config();
|
||||
MX_GPIO_Init();
|
||||
MX_DMA_Init();
|
||||
MX_LPUART1_UART_Init();
|
||||
MX_USART2_UART_Init();
|
||||
MX_USART3_UART_Init();
|
||||
MX_DCMI_Init();
|
||||
MX_I2C1_Init();
|
||||
MX_SPI1_Init();
|
||||
MX_TIM4_Init();
|
||||
|
||||
LCD_2IN4_Init();
|
||||
OV2640_Init();
|
||||
OV2640_RGB565_Mode();
|
||||
OV2640_OutSize_Set(OV2640_PIXEL_WIDTH,OV2640_PIXEL_HEIGHT);
|
||||
|
||||
__HAL_DCMI_DISABLE_IT(&hdcmi, DCMI_IT_LINE | DCMI_IT_VSYNC);
|
||||
if (HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_CONTINUOUS, (uint32_t)camera_buffer , (OV2640_PIXEL_WIDTH*OV2640_PIXEL_HEIGHT)/2))
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
//setup(); //tensorflow init
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,7 +66,7 @@ void SystemClock_Config(void)
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
|
||||
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
|
||||
|
||||
/** Initializes the CPU, AHB and APB busses clocks
|
||||
/** Initializes the CPU, AHB and APB busses clocks
|
||||
*/
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI;
|
||||
RCC_OscInitStruct.MSIState = RCC_MSI_ON;
|
||||
@@ -61,29 +83,29 @@ void SystemClock_Config(void)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
/** Initializes the CPU, AHB and APB busses clocks
|
||||
/** Initializes the CPU, AHB and APB busses clocks
|
||||
*/
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
||||
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
|
||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
|
||||
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
|
||||
|
||||
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2|RCC_PERIPHCLK_USART3
|
||||
|RCC_PERIPHCLK_LPUART1;
|
||||
PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
|
||||
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_LPUART1|RCC_PERIPHCLK_USART2|RCC_PERIPHCLK_USART3|RCC_PERIPHCLK_I2C1;
|
||||
PeriphClkInit.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_PCLK1;
|
||||
PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
|
||||
PeriphClkInit.Usart3ClockSelection = RCC_USART3CLKSOURCE_PCLK1;
|
||||
PeriphClkInit.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_PCLK1;
|
||||
PeriphClkInit.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1;
|
||||
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
/** Configure the main internal regulator output voltage
|
||||
/** Configure the main internal regulator output voltage
|
||||
*/
|
||||
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
|
||||
{
|
||||
@@ -92,7 +114,12 @@ void SystemClock_Config(void)
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 4 */
|
||||
|
||||
void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
|
||||
{
|
||||
if(hdcmi->State == 2 && frame_flag != 1){
|
||||
frame_flag = 1;
|
||||
}
|
||||
}
|
||||
/* USER CODE END 4 */
|
||||
|
||||
/**
|
||||
@@ -116,7 +143,7 @@ void Error_Handler(void)
|
||||
* @retval None
|
||||
*/
|
||||
void assert_failed(char *file, uint32_t line)
|
||||
{
|
||||
{
|
||||
/* USER CODE BEGIN 6 */
|
||||
/* User can add his own implementation to report the file name and line number,
|
||||
tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
||||
@@ -125,3 +152,4 @@ void assert_failed(char *file, uint32_t line)
|
||||
#endif /* USE_FULL_ASSERT */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
113
board/NUCLEO_STM32L496ZG/BSP/Src/spi.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : SPI.c
|
||||
* Description : This file provides code for the configuration
|
||||
* of the SPI instances.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "spi.h"
|
||||
|
||||
/* USER CODE BEGIN 0 */
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
SPI_HandleTypeDef hspi1;
|
||||
|
||||
/* SPI1 init function */
|
||||
void MX_SPI1_Init(void)
|
||||
{
|
||||
|
||||
hspi1.Instance = SPI1;
|
||||
hspi1.Init.Mode = SPI_MODE_MASTER;
|
||||
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
|
||||
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
|
||||
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
|
||||
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
|
||||
hspi1.Init.NSS = SPI_NSS_SOFT;
|
||||
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
|
||||
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
||||
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
|
||||
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
||||
hspi1.Init.CRCPolynomial = 7;
|
||||
hspi1.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
|
||||
hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
|
||||
if (HAL_SPI_Init(&hspi1) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle)
|
||||
{
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
if(spiHandle->Instance==SPI1)
|
||||
{
|
||||
/* USER CODE BEGIN SPI1_MspInit 0 */
|
||||
|
||||
/* USER CODE END SPI1_MspInit 0 */
|
||||
/* SPI1 clock enable */
|
||||
__HAL_RCC_SPI1_CLK_ENABLE();
|
||||
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
/**SPI1 GPIO Configuration
|
||||
PA5 ------> SPI1_SCK
|
||||
PA6 ------> SPI1_MISO
|
||||
PA7 ------> SPI1_MOSI
|
||||
*/
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
/* USER CODE BEGIN SPI1_MspInit 1 */
|
||||
|
||||
/* USER CODE END SPI1_MspInit 1 */
|
||||
}
|
||||
}
|
||||
|
||||
void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle)
|
||||
{
|
||||
|
||||
if(spiHandle->Instance==SPI1)
|
||||
{
|
||||
/* USER CODE BEGIN SPI1_MspDeInit 0 */
|
||||
|
||||
/* USER CODE END SPI1_MspDeInit 0 */
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_SPI1_CLK_DISABLE();
|
||||
|
||||
/**SPI1 GPIO Configuration
|
||||
PA5 ------> SPI1_SCK
|
||||
PA6 ------> SPI1_MISO
|
||||
PA7 ------> SPI1_MOSI
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7);
|
||||
|
||||
/* USER CODE BEGIN SPI1_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END SPI1_MspDeInit 1 */
|
||||
}
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@@ -22,7 +22,6 @@
|
||||
#include "main.h"
|
||||
#include "stm32l4xx_it.h"
|
||||
#include "tos_k.h"
|
||||
//#include "tos_at.h"
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
/* USER CODE END Includes */
|
||||
@@ -58,6 +57,8 @@
|
||||
/* USER CODE END 0 */
|
||||
|
||||
/* External variables --------------------------------------------------------*/
|
||||
extern DMA_HandleTypeDef hdma_dcmi;
|
||||
extern DCMI_HandleTypeDef hdcmi;
|
||||
extern UART_HandleTypeDef hlpuart1;
|
||||
extern UART_HandleTypeDef huart2;
|
||||
extern UART_HandleTypeDef huart3;
|
||||
@@ -173,7 +174,7 @@ void DebugMon_Handler(void)
|
||||
__weak void PendSV_Handler(void)
|
||||
{
|
||||
/* USER CODE BEGIN PendSV_IRQn 0 */
|
||||
|
||||
|
||||
/* USER CODE END PendSV_IRQn 0 */
|
||||
/* USER CODE BEGIN PendSV_IRQn 1 */
|
||||
|
||||
@@ -189,15 +190,13 @@ void SysTick_Handler(void)
|
||||
|
||||
/* USER CODE END SysTick_IRQn 0 */
|
||||
HAL_IncTick();
|
||||
if (tos_knl_is_running())
|
||||
{
|
||||
tos_knl_irq_enter();
|
||||
tos_tick_handler();
|
||||
tos_knl_irq_leave();
|
||||
}
|
||||
//HAL_SYSTICK_IRQHandler();
|
||||
/* USER CODE BEGIN SysTick_IRQn 1 */
|
||||
|
||||
if(tos_knl_is_running())
|
||||
{
|
||||
tos_knl_irq_enter();
|
||||
tos_tick_handler();
|
||||
tos_knl_irq_leave();
|
||||
}
|
||||
/* USER CODE END SysTick_IRQn 1 */
|
||||
}
|
||||
|
||||
@@ -209,8 +208,33 @@ void SysTick_Handler(void)
|
||||
/******************************************************************************/
|
||||
|
||||
/**
|
||||
* @brief This function handles USART2 global interrupt.
|
||||
* @brief This function handles DMA2 channel6 global interrupt.
|
||||
*/
|
||||
void DMA2_Channel6_IRQHandler(void)
|
||||
{
|
||||
/* USER CODE BEGIN DMA2_Channel6_IRQn 0 */
|
||||
|
||||
/* USER CODE END DMA2_Channel6_IRQn 0 */
|
||||
HAL_DMA_IRQHandler(&hdma_dcmi);
|
||||
/* USER CODE BEGIN DMA2_Channel6_IRQn 1 */
|
||||
|
||||
/* USER CODE END DMA2_Channel6_IRQn 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles DCMI global interrupt.
|
||||
*/
|
||||
void DCMI_IRQHandler(void)
|
||||
{
|
||||
/* USER CODE BEGIN DCMI_IRQn 0 */
|
||||
|
||||
/* USER CODE END DCMI_IRQn 0 */
|
||||
HAL_DCMI_IRQHandler(&hdcmi);
|
||||
/* USER CODE BEGIN DCMI_IRQn 1 */
|
||||
|
||||
/* USER CODE END DCMI_IRQn 1 */
|
||||
}
|
||||
|
||||
void USART2_IRQHandler(void)
|
||||
{
|
||||
/* USER CODE BEGIN USART2_IRQn 0 */
|
||||
@@ -242,13 +266,13 @@ void USART3_IRQHandler(void)
|
||||
void LPUART1_IRQHandler(void)
|
||||
{
|
||||
/* USER CODE BEGIN LPUART1_IRQn 0 */
|
||||
|
||||
tos_knl_irq_enter();
|
||||
/* USER CODE END LPUART1_IRQn 0 */
|
||||
tos_knl_irq_enter();
|
||||
|
||||
HAL_UART_IRQHandler(&hlpuart1);
|
||||
tos_knl_irq_leave();
|
||||
|
||||
/* USER CODE BEGIN LPUART1_IRQn 1 */
|
||||
|
||||
tos_knl_irq_leave();
|
||||
/* USER CODE END LPUART1_IRQn 1 */
|
||||
}
|
||||
|
||||
|
136
board/NUCLEO_STM32L496ZG/BSP/Src/tim.c
Normal file
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* File Name : TIM.c
|
||||
* Description : This file provides code for the configuration
|
||||
* of the TIM instances.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "tim.h"
|
||||
|
||||
/* USER CODE BEGIN 0 */
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
TIM_HandleTypeDef htim4;
|
||||
|
||||
/* TIM4 init function */
|
||||
void MX_TIM4_Init(void)
|
||||
{
|
||||
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
|
||||
TIM_MasterConfigTypeDef sMasterConfig = {0};
|
||||
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||
|
||||
htim4.Instance = TIM4;
|
||||
htim4.Init.Prescaler = 300;
|
||||
htim4.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
htim4.Init.Period = 999;
|
||||
htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||
htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||
if (HAL_TIM_Base_Init(&htim4) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
|
||||
if (HAL_TIM_ConfigClockSource(&htim4, &sClockSourceConfig) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
if (HAL_TIM_PWM_Init(&htim4) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
|
||||
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
|
||||
if (HAL_TIMEx_MasterConfigSynchronization(&htim4, &sMasterConfig) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
||||
sConfigOC.Pulse = 0;
|
||||
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||
if (HAL_TIM_PWM_ConfigChannel(&htim4, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
HAL_TIM_MspPostInit(&htim4);
|
||||
|
||||
}
|
||||
|
||||
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
|
||||
{
|
||||
|
||||
if(tim_baseHandle->Instance==TIM4)
|
||||
{
|
||||
/* USER CODE BEGIN TIM4_MspInit 0 */
|
||||
|
||||
/* USER CODE END TIM4_MspInit 0 */
|
||||
/* TIM4 clock enable */
|
||||
__HAL_RCC_TIM4_CLK_ENABLE();
|
||||
/* USER CODE BEGIN TIM4_MspInit 1 */
|
||||
|
||||
/* USER CODE END TIM4_MspInit 1 */
|
||||
}
|
||||
}
|
||||
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle)
|
||||
{
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
if(timHandle->Instance==TIM4)
|
||||
{
|
||||
/* USER CODE BEGIN TIM4_MspPostInit 0 */
|
||||
|
||||
/* USER CODE END TIM4_MspPostInit 0 */
|
||||
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
/**TIM4 GPIO Configuration
|
||||
PB6 ------> TIM4_CH1
|
||||
*/
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_6;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
/* USER CODE BEGIN TIM4_MspPostInit 1 */
|
||||
|
||||
/* USER CODE END TIM4_MspPostInit 1 */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
|
||||
{
|
||||
|
||||
if(tim_baseHandle->Instance==TIM4)
|
||||
{
|
||||
/* USER CODE BEGIN TIM4_MspDeInit 0 */
|
||||
|
||||
/* USER CODE END TIM4_MspDeInit 0 */
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_TIM4_CLK_DISABLE();
|
||||
/* USER CODE BEGIN TIM4_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END TIM4_MspDeInit 1 */
|
||||
}
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@@ -131,7 +131,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
|
||||
PG7 ------> LPUART1_TX
|
||||
PG8 ------> LPUART1_RX
|
||||
*/
|
||||
GPIO_InitStruct.Pin = STLK_RX_Pin|STLK_TX_Pin;
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||
@@ -240,7 +240,7 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
|
||||
PG7 ------> LPUART1_TX
|
||||
PG8 ------> LPUART1_RX
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOG, STLK_RX_Pin|STLK_TX_Pin);
|
||||
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_7|GPIO_PIN_7);
|
||||
|
||||
/* LPUART1 interrupt Deinit */
|
||||
HAL_NVIC_DisableIRQ(LPUART1_IRQn);
|
||||
|
@@ -1,139 +1,248 @@
|
||||
#MicroXplorer Configuration settings - do not modify
|
||||
File.Version=6
|
||||
KeepUserPlacement=false
|
||||
LPUART1.BaudRate=115200
|
||||
LPUART1.IPParameters=WordLength,BaudRate
|
||||
LPUART1.WordLength=UART_WORDLENGTH_8B
|
||||
Mcu.Family=STM32L4
|
||||
Mcu.IP0=LPUART1
|
||||
Mcu.IP1=NVIC
|
||||
Mcu.IP2=RCC
|
||||
Mcu.IP3=SYS
|
||||
Mcu.IPNb=4
|
||||
Mcu.Name=STM32L496Z(E-G)Tx
|
||||
Mcu.Package=LQFP144
|
||||
Mcu.Pin0=PC14-OSC32_IN (PC14)
|
||||
Mcu.Pin1=PC15-OSC32_OUT (PC15)
|
||||
Mcu.Pin2=PG7
|
||||
Mcu.Pin3=PG8
|
||||
Mcu.Pin4=VP_SYS_VS_Systick
|
||||
Mcu.PinsNb=5
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32L496ZGTx
|
||||
MxCube.Version=5.4.0
|
||||
MxDb.Version=DB.5.0.40
|
||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.ForceEnableDMAVector=true
|
||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
|
||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator
|
||||
PC14-OSC32_IN\ (PC14).Signal=RCC_OSC32_IN
|
||||
PC15-OSC32_OUT\ (PC15).Mode=LSE-External-Oscillator
|
||||
PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC32_OUT
|
||||
PCC.Checker=true
|
||||
PCC.Line=STM32L4x6
|
||||
PCC.MCU=STM32L496Z(E-G)Tx
|
||||
PCC.PartNumber=STM32L496ZGTx
|
||||
PCC.Seq0=0
|
||||
PCC.Series=STM32L4
|
||||
PCC.Temperature=25
|
||||
PCC.Vdd=3.0
|
||||
PG7.Locked=true
|
||||
PG7.Mode=Asynchronous
|
||||
PG7.Signal=LPUART1_TX
|
||||
PG8.Locked=true
|
||||
PG8.Mode=Asynchronous
|
||||
PG8.Signal=LPUART1_RX
|
||||
PinOutPanel.RotationAngle=0
|
||||
ProjectManager.AskForMigrate=true
|
||||
ProjectManager.BackupPrevious=false
|
||||
ProjectManager.CompilerOptimize=6
|
||||
ProjectManager.ComputerToolchain=false
|
||||
ProjectManager.CoupleFile=true
|
||||
ProjectManager.CustomerFirmwarePackage=
|
||||
ProjectManager.DefaultFWLocation=true
|
||||
ProjectManager.DeletePrevious=true
|
||||
ProjectManager.DeviceId=STM32L496ZGTx
|
||||
ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.14.0
|
||||
ProjectManager.FreePins=false
|
||||
ProjectManager.HalAssertFull=false
|
||||
ProjectManager.HeapSize=0x200
|
||||
ProjectManager.KeepUserCode=true
|
||||
ProjectManager.LastFirmware=true
|
||||
ProjectManager.LibraryCopy=0
|
||||
ProjectManager.MainLocation=Src
|
||||
ProjectManager.NoMain=false
|
||||
ProjectManager.PreviousToolchain=
|
||||
ProjectManager.ProjectBuild=false
|
||||
ProjectManager.ProjectFileName=TencentOS_tiny.ioc
|
||||
ProjectManager.ProjectName=TencentOS_tiny
|
||||
ProjectManager.StackSize=0x400
|
||||
ProjectManager.TargetToolchain=EWARM V8
|
||||
ProjectManager.ToolChainLocation=
|
||||
ProjectManager.UnderRoot=false
|
||||
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_LPUART1_UART_Init-LPUART1-false-HAL-true
|
||||
RCC.ADCFreq_Value=64000000
|
||||
RCC.AHBFreq_Value=80000000
|
||||
RCC.APB1Freq_Value=80000000
|
||||
RCC.APB1TimFreq_Value=80000000
|
||||
RCC.APB2Freq_Value=80000000
|
||||
RCC.APB2TimFreq_Value=80000000
|
||||
RCC.CortexFreq_Value=80000000
|
||||
RCC.DFSDMFreq_Value=80000000
|
||||
RCC.FCLKCortexFreq_Value=80000000
|
||||
RCC.FamilyName=M
|
||||
RCC.HCLKFreq_Value=80000000
|
||||
RCC.HSE_VALUE=8000000
|
||||
RCC.HSI48_VALUE=48000000
|
||||
RCC.HSI_VALUE=16000000
|
||||
RCC.I2C1Freq_Value=80000000
|
||||
RCC.I2C2Freq_Value=80000000
|
||||
RCC.I2C3Freq_Value=80000000
|
||||
RCC.I2C4Freq_Value=80000000
|
||||
RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2C4Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2RoutputFreq_Value,PLLSourceVirtual,PWRFreq_Value,RNGFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value
|
||||
RCC.LPTIM1Freq_Value=80000000
|
||||
RCC.LPTIM2Freq_Value=80000000
|
||||
RCC.LPUART1Freq_Value=80000000
|
||||
RCC.LSCOPinFreq_Value=32000
|
||||
RCC.LSI_VALUE=32000
|
||||
RCC.MCO1PinFreq_Value=80000000
|
||||
RCC.MSI_VALUE=4000000
|
||||
RCC.PLLN=10
|
||||
RCC.PLLPoutputFreq_Value=80000000
|
||||
RCC.PLLQoutputFreq_Value=80000000
|
||||
RCC.PLLRCLKFreq_Value=80000000
|
||||
RCC.PLLSAI1PoutputFreq_Value=64000000
|
||||
RCC.PLLSAI1QoutputFreq_Value=64000000
|
||||
RCC.PLLSAI1RoutputFreq_Value=64000000
|
||||
RCC.PLLSAI2PoutputFreq_Value=64000000
|
||||
RCC.PLLSAI2RoutputFreq_Value=64000000
|
||||
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSI
|
||||
RCC.PWRFreq_Value=80000000
|
||||
RCC.RNGFreq_Value=64000000
|
||||
RCC.SAI1Freq_Value=64000000
|
||||
RCC.SAI2Freq_Value=64000000
|
||||
RCC.SDMMCFreq_Value=64000000
|
||||
RCC.SWPMI1Freq_Value=80000000
|
||||
RCC.SYSCLKFreq_VALUE=80000000
|
||||
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
|
||||
RCC.UART4Freq_Value=80000000
|
||||
RCC.UART5Freq_Value=80000000
|
||||
PG8.Mode=Asynchronous
|
||||
PA6.Mode=Full_Duplex_Master
|
||||
RCC.USART1Freq_Value=80000000
|
||||
RCC.SAI1Freq_Value=64000000
|
||||
RCC.CortexFreq_Value=80000000
|
||||
ProjectManager.KeepUserCode=true
|
||||
Mcu.UserName=STM32L496ZGTx
|
||||
SPI1.VirtualType=VM_MASTER
|
||||
PG8.Signal=LPUART1_RX
|
||||
PG8.Locked=true
|
||||
RCC.PLLSAI1RoutputFreq_Value=64000000
|
||||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_LPUART1_UART_Init-LPUART1-false-HAL-true,5-MX_DCMI_Init-DCMI-false-HAL-true,6-MX_I2C1_Init-I2C1-false-HAL-true,7-MX_SPI1_Init-SPI1-false-HAL-true,8-MX_TIM4_Init-TIM4-false-HAL-true
|
||||
LPUART1.WordLength=UART_WORDLENGTH_8B
|
||||
RCC.USART2Freq_Value=80000000
|
||||
RCC.USART3Freq_Value=80000000
|
||||
RCC.USBFreq_Value=64000000
|
||||
RCC.VCOInputFreq_Value=16000000
|
||||
RCC.VCOOutputFreq_Value=160000000
|
||||
PA15\ (JTDI).Signal=SYS_JTDI
|
||||
PC15-OSC32_OUT\ (PC15).Mode=LSE-External-Oscillator
|
||||
PG13.Signal=I2C1_SDA
|
||||
PD9.Mode=Slave_8_bits_External_Synchro
|
||||
PinOutPanel.RotationAngle=0
|
||||
RCC.MCO1PinFreq_Value=80000000
|
||||
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
|
||||
ProjectManager.StackSize=0x400
|
||||
PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator
|
||||
Dma.DCMI.0.MemDataAlignment=DMA_MDATAALIGN_WORD
|
||||
RCC.I2C3Freq_Value=80000000
|
||||
RCC.LPTIM1Freq_Value=80000000
|
||||
Mcu.IP4=NVIC
|
||||
Mcu.IP5=RCC
|
||||
RCC.FCLKCortexFreq_Value=80000000
|
||||
Mcu.IP2=I2C1
|
||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
Mcu.IP3=LPUART1
|
||||
Mcu.IP0=DCMI
|
||||
PA12.Locked=true
|
||||
PA14\ (JTCK/SWCLK).Signal=SYS_JTCK-SWCLK
|
||||
PA15\ (JTDI).Mode=JTAG_4_pins
|
||||
Mcu.IP1=DMA
|
||||
Dma.DCMI.0.MemInc=DMA_MINC_ENABLE
|
||||
PA12.Signal=GPIO_Output
|
||||
Mcu.UserConstants=
|
||||
RCC.VCOSAI1OutputFreq_Value=128000000
|
||||
RCC.VCOSAI2OutputFreq_Value=128000000
|
||||
VP_SYS_VS_Systick.Mode=SysTick
|
||||
PA4.Mode=Slave_8_bits_External_Synchro
|
||||
Dma.DCMI.0.PeriphDataAlignment=DMA_PDATAALIGN_WORD
|
||||
RCC.SDMMCFreq_Value=64000000
|
||||
Mcu.ThirdPartyNb=0
|
||||
SPI1.Direction=SPI_DIRECTION_2LINES
|
||||
RCC.HCLKFreq_Value=80000000
|
||||
RCC.I2C4Freq_Value=80000000
|
||||
Mcu.IPNb=9
|
||||
ProjectManager.PreviousToolchain=
|
||||
RCC.APB2TimFreq_Value=80000000
|
||||
PB6.Signal=S_TIM4_CH1
|
||||
PC7.Signal=DCMI_D1
|
||||
SPI1.CalculateBaudRate=40.0 MBits/s
|
||||
Mcu.Pin6=PA5
|
||||
RCC.SAI2Freq_Value=64000000
|
||||
Mcu.Pin7=PA6
|
||||
PE5.Signal=DCMI_D6
|
||||
Mcu.Pin8=PA7
|
||||
Mcu.Pin9=PB12
|
||||
RCC.AHBFreq_Value=80000000
|
||||
Mcu.Pin0=PE4
|
||||
Mcu.Pin1=PE5
|
||||
GPIO.groupedBy=Group By Peripherals
|
||||
Mcu.Pin2=PE6
|
||||
Mcu.Pin3=PC14-OSC32_IN (PC14)
|
||||
RCC.USART3Freq_Value=80000000
|
||||
Mcu.Pin4=PC15-OSC32_OUT (PC15)
|
||||
Mcu.Pin5=PA4
|
||||
ProjectManager.ProjectBuild=false
|
||||
RCC.HSE_VALUE=8000000
|
||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
DCMI.PCKPolarity=DCMI_PCKPOLARITY_RISING
|
||||
PG14.Mode=I2C
|
||||
ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.14.0
|
||||
MxDb.Version=DB.5.0.40
|
||||
ProjectManager.BackupPrevious=false
|
||||
RCC.VCOInputFreq_Value=16000000
|
||||
SPI1.DataSize=SPI_DATASIZE_8BIT
|
||||
File.Version=6
|
||||
PC9.Mode=Slave_8_bits_External_Synchro
|
||||
PB7.Signal=DCMI_VSYNC
|
||||
PA14\ (JTCK/SWCLK).Mode=JTAG_4_pins
|
||||
RCC.PLLRCLKFreq_Value=80000000
|
||||
PG13.Mode=I2C
|
||||
PB6.Locked=true
|
||||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
PE4.Mode=Slave_8_bits_External_Synchro
|
||||
TIM4.Period=999
|
||||
PA13\ (JTMS/SWDIO).Locked=true
|
||||
PD3.Mode=Slave_8_bits_External_Synchro
|
||||
PE4.Signal=DCMI_D4
|
||||
Dma.RequestsNb=1
|
||||
ProjectManager.HalAssertFull=false
|
||||
ProjectManager.ProjectName=TencentOS_tiny
|
||||
Mcu.Package=LQFP144
|
||||
PA6.Signal=SPI1_MISO
|
||||
Dma.DCMI.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
|
||||
PA5.Locked=true
|
||||
Dma.DCMI.0.Direction=DMA_PERIPH_TO_MEMORY
|
||||
ProjectManager.ToolChainLocation=
|
||||
PA14\ (JTCK/SWCLK).Locked=true
|
||||
RCC.LSI_VALUE=32000
|
||||
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
|
||||
RCC.LSCOPinFreq_Value=32000
|
||||
RCC.DFSDMFreq_Value=80000000
|
||||
RCC.PLLPoutputFreq_Value=80000000
|
||||
SH.S_TIM4_CH1.0=TIM4_CH1,PWM Generation1 CH1
|
||||
RCC.APB1TimFreq_Value=80000000
|
||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
RCC.LPUART1Freq_Value=80000000
|
||||
Dma.Request0=DCMI
|
||||
ProjectManager.CustomerFirmwarePackage=
|
||||
RCC.HSI48_VALUE=48000000
|
||||
PA5.Mode=Full_Duplex_Master
|
||||
RCC.MSI_VALUE=4000000
|
||||
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSI
|
||||
TIM4.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
|
||||
SH.S_TIM4_CH1.ConfNb=1
|
||||
RCC.PLLQoutputFreq_Value=80000000
|
||||
ProjectManager.ProjectFileName=TencentOS_tiny.ioc
|
||||
PG7.Locked=true
|
||||
PA7.Mode=Full_Duplex_Master
|
||||
PG7.Signal=LPUART1_TX
|
||||
PA13\ (JTMS/SWDIO).Mode=JTAG_4_pins
|
||||
Mcu.PinsNb=31
|
||||
ProjectManager.NoMain=false
|
||||
SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize
|
||||
RCC.SWPMI1Freq_Value=80000000
|
||||
PD3.Signal=DCMI_D5
|
||||
PC8.Signal=DCMI_D2
|
||||
PC6.Signal=DCMI_D0
|
||||
ProjectManager.DefaultFWLocation=true
|
||||
PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC32_OUT
|
||||
PD9.Signal=DCMI_PIXCLK
|
||||
PB12.Locked=true
|
||||
ProjectManager.DeletePrevious=true
|
||||
PB14.Locked=true
|
||||
RCC.VCOSAI2OutputFreq_Value=128000000
|
||||
LPUART1.IPParameters=WordLength,BaudRate
|
||||
RCC.FamilyName=M
|
||||
PA11.Locked=true
|
||||
PB3\ (JTDO/TRACESWO).Locked=true
|
||||
PB3\ (JTDO/TRACESWO).Signal=SYS_JTDO-SWO
|
||||
VP_TIM4_VS_ClockSourceINT.Signal=TIM4_VS_ClockSourceINT
|
||||
ProjectManager.TargetToolchain=EWARM V8
|
||||
TIM4.IPParameters=Channel-PWM Generation1 CH1,Prescaler,Period
|
||||
PC6.Mode=Slave_8_bits_External_Synchro
|
||||
Dma.DCMI.0.Instance=DMA2_Channel6
|
||||
Dma.DCMI.0.Mode=DMA_CIRCULAR
|
||||
ProjectManager.RegisterCallBack=
|
||||
RCC.USBFreq_Value=64000000
|
||||
TIM4.Prescaler=300
|
||||
PG7.Mode=Asynchronous
|
||||
RCC.PLLSAI1PoutputFreq_Value=64000000
|
||||
DCMI.JPEGMode=DCMI_JPEG_ENABLE
|
||||
PB14.Signal=GPIO_Output
|
||||
RCC.PLLSAI2RoutputFreq_Value=64000000
|
||||
PA5.Signal=SPI1_SCK
|
||||
PG14.Signal=I2C1_SCL
|
||||
DCMI.IPParameters=JPEGMode,PCKPolarity
|
||||
board=custom
|
||||
RCC.VCOOutputFreq_Value=160000000
|
||||
ProjectManager.LastFirmware=true
|
||||
RCC.APB2Freq_Value=80000000
|
||||
RCC.UART4Freq_Value=80000000
|
||||
PE6.Mode=Slave_8_bits_External_Synchro
|
||||
MxCube.Version=5.4.0
|
||||
RCC.I2C1Freq_Value=80000000
|
||||
SPI1.Mode=SPI_MODE_MASTER
|
||||
RCC.RNGFreq_Value=64000000
|
||||
PE5.Mode=Slave_8_bits_External_Synchro
|
||||
RCC.PLLSAI1QoutputFreq_Value=64000000
|
||||
Mcu.Pin30=VP_TIM4_VS_ClockSourceINT
|
||||
RCC.ADCFreq_Value=64000000
|
||||
VP_SYS_VS_Systick.Mode=SysTick
|
||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
NVIC.DMA2_Channel6_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
PE6.Signal=DCMI_D7
|
||||
RCC.UART5Freq_Value=80000000
|
||||
ProjectManager.FreePins=false
|
||||
RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2C4Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2RoutputFreq_Value,PLLSourceVirtual,PWRFreq_Value,RNGFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value
|
||||
ProjectManager.AskForMigrate=false
|
||||
Mcu.Name=STM32L496Z(E-G)Tx
|
||||
RCC.LPTIM2Freq_Value=80000000
|
||||
Mcu.Pin26=PB3 (JTDO/TRACESWO)
|
||||
Mcu.Pin27=PB6
|
||||
LPUART1.BaudRate=115200
|
||||
Mcu.Pin24=PG13
|
||||
ProjectManager.UnderRoot=false
|
||||
Mcu.Pin25=PG14
|
||||
Mcu.IP8=TIM4
|
||||
Mcu.Pin28=PB7
|
||||
Mcu.IP6=SPI1
|
||||
PC8.Mode=Slave_8_bits_External_Synchro
|
||||
Mcu.Pin29=VP_SYS_VS_Systick
|
||||
Mcu.IP7=SYS
|
||||
ProjectManager.CoupleFile=true
|
||||
PA4.Signal=DCMI_HSYNC
|
||||
RCC.SYSCLKFreq_VALUE=80000000
|
||||
Mcu.Pin22=PA15 (JTDI)
|
||||
Mcu.Pin23=PD3
|
||||
Mcu.Pin20=PA13 (JTMS/SWDIO)
|
||||
Mcu.Pin21=PA14 (JTCK/SWCLK)
|
||||
NVIC.ForceEnableDMAVector=true
|
||||
RCC.PLLSAI2PoutputFreq_Value=64000000
|
||||
KeepUserPlacement=false
|
||||
PC14-OSC32_IN\ (PC14).Signal=RCC_OSC32_IN
|
||||
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
ProjectManager.CompilerOptimize=6
|
||||
PB7.Mode=Slave_8_bits_External_Synchro
|
||||
PA11.Signal=GPIO_Output
|
||||
ProjectManager.HeapSize=0x200
|
||||
Mcu.Pin15=PC7
|
||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
|
||||
Mcu.Pin16=PC8
|
||||
Mcu.Pin13=PG8
|
||||
Mcu.Pin14=PC6
|
||||
Mcu.Pin19=PA12
|
||||
ProjectManager.ComputerToolchain=false
|
||||
Mcu.Pin17=PC9
|
||||
RCC.HSI_VALUE=16000000
|
||||
Mcu.Pin18=PA11
|
||||
VP_TIM4_VS_ClockSourceINT.Mode=Internal
|
||||
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
|
||||
Mcu.Pin11=PD9
|
||||
Mcu.Pin12=PG7
|
||||
RCC.PLLN=10
|
||||
PB3\ (JTDO/TRACESWO).Mode=JTAG_4_pins
|
||||
Mcu.Pin10=PB14
|
||||
RCC.PWRFreq_Value=80000000
|
||||
Dma.DCMI.0.PeriphInc=DMA_PINC_DISABLE
|
||||
PC9.Signal=DCMI_D3
|
||||
NVIC.DCMI_IRQn=true\:0\:0\:false\:false\:true\:true\:true
|
||||
PC7.Mode=Slave_8_bits_External_Synchro
|
||||
RCC.I2C2Freq_Value=80000000
|
||||
RCC.APB1Freq_Value=80000000
|
||||
ProjectManager.DeviceId=STM32L496ZGTx
|
||||
PB12.Signal=GPIO_Output
|
||||
ProjectManager.LibraryCopy=0
|
||||
PA13\ (JTMS/SWDIO).Signal=SYS_JTMS-SWDIO
|
||||
Dma.DCMI.0.Priority=DMA_PRIORITY_HIGH
|
||||
PA7.Signal=SPI1_MOSI
|
||||
|
@@ -0,0 +1,330 @@
|
||||
# TensorFlow Lite Micro移植参考指南(Keil版)
|
||||
|
||||
**作者:**
|
||||
|
||||
Github: [Derekduke](https://github.com/Derekduke) E-mail: dkeji627@gmail.com
|
||||
|
||||
Github: [QingChuanWS](https://github.com/QingChuanWS) E-mail: bingshan45@163.com
|
||||
|
||||
Github: [yangqings](https://github.com/yangqings) E-mail: yangqingsheng12@outlook.com
|
||||
|
||||
## 概述
|
||||
|
||||
本教程是基于STM32 NUCLEO-L496ZG(Cortex-M4, 80Mhz)开发板,在运行TencentOS tiny的基础上,使用Tensorflow Lite Micro框架和CMSIS-NN库(算子加速),在STM32L496ZG上实现了**行人检测模型**的推理。
|
||||
|
||||
关于Tensorflow Lite Micro组件的详细介绍可以参考`TencentOS-tiny\components\ai\tflite_micro`目录下的TFlite_Micro_Component_User_Guide.md文档。
|
||||
|
||||
本例程中,传入神经网络的RGB图像大小为 18kb(96*96 * 2byte),在STM32L496平台消耗的内存资源(经过优化后)如下:
|
||||
|
||||
- SRAM:168 Kbyte
|
||||
- Flash:314 Kbyte
|
||||
|
||||
理论上满足以上内存要求的STM32 Cortex-M系列MCU可以参考本指南进行移植。
|
||||
|
||||
## 一、移植前的准备
|
||||
|
||||
#### 1. 准备目标硬件(开发板/传感器/模组)
|
||||
|
||||
需要准备如下硬件:
|
||||
|
||||
- 开发板:NUCLEO-L496ZG,MCU为STM32L496ZG;
|
||||
- Camera:获取RGB图像,本例程使用OV2640摄像头;
|
||||
- LCD:显示RGB图像,本例程使用2.4寸LCD(SPI通信);
|
||||
|
||||
硬件实物图如下:
|
||||
|
||||
<div align=center>
|
||||
<img src="image/all.jpg" width=50% />
|
||||
</div>
|
||||
|
||||
#### 2.准备TencentOS tiny基础keil工程代码
|
||||
|
||||
- 首先,参考TencentOS tiny基于keil的移植教程进行移植:
|
||||
https://github.com/Tencent/TencentOS-tiny/blob/master/doc/10.Porting_Manual_for_KEIL.md
|
||||
- 为了方便初始化MCU的外设,后续要继续使用STM32CubeMX软件,请确保安装了该软件;
|
||||
|
||||
- 移植成功后,工程可以进行线程任务切换,通过串口打印"hello world",基础keil工程代码准备完毕。
|
||||
|
||||
#### 3. 获取Tensorflow Lite Micro
|
||||
|
||||
有三种方式获取tflite_micro:
|
||||
|
||||
1. 从TencentOS tiny 代码仓库 `components\ai\tflite_micro`目录获取;
|
||||
2. 以lib文件的形式使用tflite_micro组件,lib文件`TencentOS-tiny\components\ai\tflite_micro`的ARM_CortexM4_lib、ARM_CortexM7_lib和ARM_CortexM55_lib文件夹;
|
||||
3. 从Tensorflow代码仓库获取,TFlite_Micro的源码已经开源,github仓库地址为:https://github.com/tensorflow/tensorflow ,可根据google TFLite Micro官方教程获得Tensorflow Lite Micro的全部源码。
|
||||
|
||||
如果没有tflite_micro开发经验,建议以**第一种**或者**第二种**方式获取tflite_micro,希望自行获取最新源码,或者编译lib文件,请参考`TencentOS-tiny\components\tflite_micro`目录的TFlite_Micro_Component_User_Guide.md文档,本指南将直接使用TencentOS tiny 代码仓库内的tflite_micro组件。
|
||||
|
||||
## 二、BSP准备
|
||||
|
||||
### 1. 工程目录规划
|
||||
|
||||
以下是整个例程的目录规划:
|
||||
|
||||
| 一级目录 | 二级目录 | 三级目录 | 说明 |
|
||||
| :-------: | :--------------------------: | :-------------------: | :----------------------------------------------------------: |
|
||||
| arch | arm | | TencentOS tiny适配的IP核架构(含M核中断、调度、tick相关代码) |
|
||||
| board | NUCLEO_STM32L496ZG | | 移植目标芯片的工程文件 |
|
||||
| | | BSP | 板级支持包,外设驱动代码在Hardware目录 |
|
||||
| component | ai | tflite_micro | tflite_micro源码及有关库文件 |
|
||||
| examples | tflitemicro_person_detection | | 行人检测demo示例 |
|
||||
| | | tflu_person_detection | 行人检测实例代码 |
|
||||
| kernel | core | | TencentOS tiny内核源码 |
|
||||
| | pm | | TencentOS tiny低功耗模块源码 |
|
||||
| osal | cmsis_os | | TencentOS tiny提供的cmsis os 适配 |
|
||||
|
||||
完成TencentOS tiny基础keil工程准备工作后,在这个keil工程的基础上继续添加外设驱动代码。
|
||||
|
||||
### 2. LCD驱动
|
||||
|
||||
本例程选用一款2.4寸LCD屏幕,分辨率为 240*320, SPI 接口通信,内部控制芯片为IL9341。
|
||||
|
||||
开发者也可以使用其他LCD,自行完成LCD的驱动代码移植,方便调试摄像头,以及查看图像是否正常。
|
||||
|
||||
#### 2.1 SPI初始化
|
||||
|
||||
进入`TencentOS-tiny\board\NUCLEO_STM32L496ZG\BSP`目录,打开TencentOS_tiny.ioc工程,使用STM32CubeMX初始化MCU外设。
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/spi init.png" width=100% />
|
||||
</div>
|
||||
#### 2.2 打开keil的Manage Project Items
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/bsp_keil_manage_project.png" width=60% />
|
||||
</div>
|
||||
|
||||
#### 2.3 在project中加入新的文件夹hal
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/bsp_添加hal.png" width=80% />
|
||||
</div>
|
||||
|
||||
|
||||
#### 2.3 添加驱动代码
|
||||
|
||||
添加`lcd_2inch4.c`和`lcd_config.c`,
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/bsp_add lcd driver file.png" width=80% />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
添加头文件`lcd_2inch4.h`和`lcd_config.h`路径
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/bsp_include_path.png" width=80% />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/bsp_include_lcd_path.png" width=80% />
|
||||
</div>
|
||||
外设驱动的头文件.h文件都在`TencentOS-tiny\board\NUCLEO_STM32L496ZG\BSP\Hardware\Inc`路径下。
|
||||
|
||||
### 3. 摄像头驱动
|
||||
|
||||
#### 3.1 外设初始化
|
||||
|
||||
进入`TencentOS-tiny\board\NUCLEO_STM32L496ZG\BSP`目录,打开TencentOS_tiny.ioc工程,初始化DCMI外设,打开DCMI全局中断,并打开DMA通道,DMA的Direction设置为Peripheral To Memory。
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/bsp_cubemx_dcmi.png" width=100% />
|
||||
</div>
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/bsp_cubemx_dcmi_2.png" width=100% />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
#### 3.2 添加驱动代码
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/bsp_add camera driver file.png" width=80% />
|
||||
</div>
|
||||
|
||||
**在mcu_init函数重写DCMI帧中断回调函数:**
|
||||
|
||||
值得注意的是,代码需要写在CubeMx生成的注释语句内,当使用CubeMX重新配置外设并生成代码时,所添加的代码才不会被覆盖掉,如下所示,代码添加在/* USER CODE BEGIN 4 */ 和 /* USER CODE END 4 */注释语句之间:
|
||||
|
||||
```C
|
||||
/* USER CODE BEGIN 4 */
|
||||
void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
|
||||
{
|
||||
if(hdcmi->State == 2 && frame_flag != 1){
|
||||
frame_flag = 1;
|
||||
}
|
||||
}
|
||||
/* USER CODE END 4 */
|
||||
```
|
||||
|
||||
### 4. LCD显示摄像头图像
|
||||
|
||||
本例程的任务函数在
|
||||
|
||||
`TencentOS-tiny\examples\tflitemicro_person_detection\tflitemicro_person_detection.c`
|
||||
|
||||
```c
|
||||
void task1(void *arg)
|
||||
{
|
||||
while (1) {
|
||||
if(frame_flag == 1){
|
||||
|
||||
if(HAL_DCMI_Stop(&hdcmi))Error_Handler(); //stop DCMI
|
||||
LCD_2IN4_Display(camera_buffer,OV2640_PIXEL_WIDTH,OV2640_PIXEL_HEIGHT);
|
||||
//display
|
||||
frame_flag = 0;
|
||||
if(HAL_DCMI_Start_DMA(&hdcmi,DCMI_MODE_CONTINUOUS,\ //restart DCMI
|
||||
(uint32_t)camera_buffer ,\
|
||||
(OV2640_PIXEL_WIDTH*OV2640_PIXEL_HEIGHT)/2))
|
||||
Error_Handler();
|
||||
osDelay(50);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
经过以上步骤,如果能顺利地驱动摄像头,并在LCD实时显示图像,BSP就准备完毕了,如果使用的是不同的LCD或者Camera,请根据实际情况进行外设初始化和驱动的移植。
|
||||
|
||||
## 三、Tensorflow Lite Micro移植
|
||||
|
||||
### 1. tflite_micro组件加入到keil工程
|
||||
|
||||
由于NUCLEO-L496ZG芯片中的内核为ARM Cortex M4,所以本次我们可以直接使用ARM Cortex M4版本的tensorflow_lite_micro.lib库来简化tflite_micro搭建流程。
|
||||
|
||||
#### 1.1 在project中加入新的文件夹tensorflow
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/tflu_tensorflow文件夹增加的内容.png" width=80% />
|
||||
</div>
|
||||
|
||||
#### 1.2 添加本次与行人检测demo有关的源文件
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/tflu_需要添加的文件.png" width=80% />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
其中,retarget.c的路径为:`TencentOS-tiny\components\ai\tflite_micro\KEIL\retarget.c`
|
||||
|
||||
tensorflow_lite_micro.lib的路径为:`TencentOS-stiny\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow_lite_micro.lib`
|
||||
|
||||
其余.cc文件和.h均在`examples\tflu_person_detection\tflu_person_detection`文件夹中。
|
||||
|
||||
#### 1.3 关闭Keil的MicroLib库
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/tflu_取消Microlib.png" width=80% />
|
||||
</div>
|
||||
|
||||
#### 1.4 添加tflite_micro需要的头文件
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/tflu_添加include.png" width=80% />
|
||||
</div>
|
||||
|
||||
注:最下方的路径为:
|
||||
|
||||
```
|
||||
TencentOS-tiny\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow\lite\micro\tools\make\downloads
|
||||
```
|
||||
|
||||
#### 1.5 调整优化等级和tflite_micro的交互信息输出串口:
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/tflu_STM32496宏.png" width=80% />
|
||||
</div>
|
||||
|
||||
其中宏`NUCLEO_STM32L496ZG`是指定Nucleo STM32L496的hlpuart1为系统printf函数的输出串口,具体定义在Nucleo STM32L496的BSP文件夹中的`mcu_init.c`中。
|
||||
|
||||
### 2. 编写Person_Detection 任务函数
|
||||
|
||||
本例程的任务函数在
|
||||
|
||||
`TencentOS-tiny\examples\tflitemicro_person_detection\tflitemicro_person_detection.c`
|
||||
|
||||
#### 2.1 图像预处理
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/RGB565.jpg" width=50% />
|
||||
</div>
|
||||
|
||||
在本例程中,模型要求输入神经网络的图像为灰度图,为完成摄像头获取的RGB彩图到模型输入需要的灰度图转换,需从输入的RGB565像素格式中解析出R、G、B三通道的值,再根据心理学公式计算出单个像素点的灰度,具体代码如下:
|
||||
|
||||
```c
|
||||
uint8_t rgb565_to_gray(uint16_t bg_color)
|
||||
{
|
||||
uint8_t bg_r = 0;
|
||||
uint8_t bg_g = 0;
|
||||
uint8_t bg_b = 0;
|
||||
bg_r = ((bg_color>>11)&0xff)<<3;
|
||||
bg_g = ((bg_color>>5)&0x3f)<<2;
|
||||
bg_b = (bg_color&0x1f)<<2;
|
||||
uint8_t gray = (bg_r*299 + bg_g*587 + bg_b*114 + 500) / 1000;
|
||||
return gray;
|
||||
}
|
||||
|
||||
void input_convert(uint16_t* camera_buffer , uint8_t* model_buffer)
|
||||
{
|
||||
for(int i=0 ; i<OV2640_PIXEL_WIDTH*OV2640_PIXEL_HEIGHT ; i++)
|
||||
{
|
||||
model_buffer[i] = rgb565_to_gray(camera_buffer[i]);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 2.2 行人检测线程任务函数
|
||||
|
||||
```c
|
||||
void task1(void *arg)
|
||||
{
|
||||
while (1) {
|
||||
if(frame_flag == 1){
|
||||
printf("***person detection task\r\n");
|
||||
if(HAL_DCMI_Stop(&hdcmi))Error_Handler(); //stop DCMI
|
||||
input_convert(camera_buffer,model_buffer);//convert input
|
||||
person_detect(model_buffer); //inference
|
||||
LCD_2IN4_Display(camera_buffer,OV2640_PIXEL_WIDTH,OV2640_PIXEL_HEIGHT);
|
||||
//display
|
||||
|
||||
frame_flag = 0;
|
||||
|
||||
if(HAL_DCMI_Start_DMA(&hdcmi,DCMI_MODE_CONTINUOUS,\ //restart DCMI
|
||||
(uint32_t)camera_buffer ,\
|
||||
(OV2640_PIXEL_WIDTH*OV2640_PIXEL_HEIGHT)/2))
|
||||
Error_Handler();
|
||||
}
|
||||
osDelay(50);
|
||||
}
|
||||
}
|
||||
|
||||
void task2(void *arg)
|
||||
{
|
||||
while (1) {
|
||||
printf("***task2\r\n");
|
||||
osDelay(50);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 2.3 运行效果
|
||||
|
||||
通过串行输出实时打印信息,移动摄像头,没有对准行人时,输出如下:
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/reasult_no_person.png" width=70% />
|
||||
</div>
|
||||
|
||||
当摄像头对准行人时,输出如下:
|
||||
|
||||
<div align=center>
|
||||
<img src="./image/reasult_person.png" width=70% />
|
||||
</div>
|
||||
|
||||
执行一帧图像推理,耗时约633 ms。
|
||||
|
||||
更多关于tflite_micro的介绍,请参考[tensorflow](https://tensorflow.google.cn/lite/microcontrollers?hl=zh_cn)官网以及`TencentOS-tiny\components\tflite_micro`目录的TFlite_Micro_Component_User_Guide.md
|
||||
|
@@ -0,0 +1,853 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
|
||||
|
||||
<SchemaVersion>2.1</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
<Targets>
|
||||
<Target>
|
||||
<TargetName>TencentOS_tiny</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>6140000::V6.14::ARMCLANG</pCCUsed>
|
||||
<uAC6>1</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>STM32L496ZGTx</Device>
|
||||
<Vendor>STMicroelectronics</Vendor>
|
||||
<PackID>Keil.STM32L4xx_DFP.2.4.0</PackID>
|
||||
<PackURL>http://www.keil.com/pack/</PackURL>
|
||||
<Cpu>IRAM(0x20000000-0x2004FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(8000000) FPU2 CPUTYPE("Cortex-M4")</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId></DeviceId>
|
||||
<RegisterFile></RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
<Cmp></Cmp>
|
||||
<Asm></Asm>
|
||||
<Linker></Linker>
|
||||
<OHString></OHString>
|
||||
<InfinionOptionDll></InfinionOptionDll>
|
||||
<SLE66CMisc></SLE66CMisc>
|
||||
<SLE66AMisc></SLE66AMisc>
|
||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||
<SFDFile>$$Device:STM32L496ZGTx$CMSIS\SVD\STM32L4x6.svd</SFDFile>
|
||||
<bCustSvd>0</bCustSvd>
|
||||
<UseEnv>0</UseEnv>
|
||||
<BinPath></BinPath>
|
||||
<IncludePath></IncludePath>
|
||||
<LibPath></LibPath>
|
||||
<RegisterFilePath></RegisterFilePath>
|
||||
<DBRegisterFilePath></DBRegisterFilePath>
|
||||
<TargetStatus>
|
||||
<Error>0</Error>
|
||||
<ExitCodeStop>0</ExitCodeStop>
|
||||
<ButtonStop>0</ButtonStop>
|
||||
<NotGenerated>0</NotGenerated>
|
||||
<InvalidFlash>1</InvalidFlash>
|
||||
</TargetStatus>
|
||||
<OutputDirectory>TencentOS_tiny\</OutputDirectory>
|
||||
<OutputName>TencentOS_tiny</OutputName>
|
||||
<CreateExecutable>1</CreateExecutable>
|
||||
<CreateLib>0</CreateLib>
|
||||
<CreateHexFile>1</CreateHexFile>
|
||||
<DebugInformation>1</DebugInformation>
|
||||
<BrowseInformation>1</BrowseInformation>
|
||||
<ListingPath></ListingPath>
|
||||
<HexFormatSelection>1</HexFormatSelection>
|
||||
<Merge32K>0</Merge32K>
|
||||
<CreateBatchFile>0</CreateBatchFile>
|
||||
<BeforeCompile>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopU1X>0</nStopU1X>
|
||||
<nStopU2X>0</nStopU2X>
|
||||
</BeforeCompile>
|
||||
<BeforeMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopB1X>0</nStopB1X>
|
||||
<nStopB2X>0</nStopB2X>
|
||||
</BeforeMake>
|
||||
<AfterMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopA1X>0</nStopA1X>
|
||||
<nStopA2X>0</nStopA2X>
|
||||
</AfterMake>
|
||||
<SelectedForBatchBuild>0</SelectedForBatchBuild>
|
||||
<SVCSIdString></SVCSIdString>
|
||||
</TargetCommonOption>
|
||||
<CommonProperty>
|
||||
<UseCPPCompiler>0</UseCPPCompiler>
|
||||
<RVCTCodeConst>0</RVCTCodeConst>
|
||||
<RVCTZI>0</RVCTZI>
|
||||
<RVCTOtherData>0</RVCTOtherData>
|
||||
<ModuleSelection>0</ModuleSelection>
|
||||
<IncludeInBuild>1</IncludeInBuild>
|
||||
<AlwaysBuild>0</AlwaysBuild>
|
||||
<GenerateAssemblyFile>0</GenerateAssemblyFile>
|
||||
<AssembleAssemblyFile>0</AssembleAssemblyFile>
|
||||
<PublicsOnly>0</PublicsOnly>
|
||||
<StopOnExitCode>3</StopOnExitCode>
|
||||
<CustomArgument></CustomArgument>
|
||||
<IncludeLibraryModules></IncludeLibraryModules>
|
||||
<ComprImg>0</ComprImg>
|
||||
</CommonProperty>
|
||||
<DllOption>
|
||||
<SimDllName>SARMCM3.DLL</SimDllName>
|
||||
<SimDllArguments>-REMAP -MPU</SimDllArguments>
|
||||
<SimDlgDll>DCM.DLL</SimDlgDll>
|
||||
<SimDlgDllArguments>-pCM4</SimDlgDllArguments>
|
||||
<TargetDllName>SARMCM3.DLL</TargetDllName>
|
||||
<TargetDllArguments>-MPU</TargetDllArguments>
|
||||
<TargetDlgDll>TCM.DLL</TargetDlgDll>
|
||||
<TargetDlgDllArguments>-pCM4</TargetDlgDllArguments>
|
||||
</DllOption>
|
||||
<DebugOption>
|
||||
<OPTHX>
|
||||
<HexSelection>1</HexSelection>
|
||||
<HexRangeLowAddress>0</HexRangeLowAddress>
|
||||
<HexRangeHighAddress>0</HexRangeHighAddress>
|
||||
<HexOffset>0</HexOffset>
|
||||
<Oh166RecLen>16</Oh166RecLen>
|
||||
</OPTHX>
|
||||
</DebugOption>
|
||||
<Utilities>
|
||||
<Flash1>
|
||||
<UseTargetDll>1</UseTargetDll>
|
||||
<UseExternalTool>0</UseExternalTool>
|
||||
<RunIndependent>0</RunIndependent>
|
||||
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
|
||||
<Capability>1</Capability>
|
||||
<DriverSelection>4107</DriverSelection>
|
||||
</Flash1>
|
||||
<bUseTDR>1</bUseTDR>
|
||||
<Flash2>BIN\UL2CM3.DLL</Flash2>
|
||||
<Flash3></Flash3>
|
||||
<Flash4></Flash4>
|
||||
<pFcarmOut></pFcarmOut>
|
||||
<pFcarmGrp></pFcarmGrp>
|
||||
<pFcArmRoot></pFcArmRoot>
|
||||
<FcArmLst>0</FcArmLst>
|
||||
</Utilities>
|
||||
<TargetArmAds>
|
||||
<ArmAdsMisc>
|
||||
<GenerateListings>0</GenerateListings>
|
||||
<asHll>1</asHll>
|
||||
<asAsm>1</asAsm>
|
||||
<asMacX>1</asMacX>
|
||||
<asSyms>1</asSyms>
|
||||
<asFals>1</asFals>
|
||||
<asDbgD>1</asDbgD>
|
||||
<asForm>1</asForm>
|
||||
<ldLst>0</ldLst>
|
||||
<ldmm>1</ldmm>
|
||||
<ldXref>1</ldXref>
|
||||
<BigEnd>0</BigEnd>
|
||||
<AdsALst>1</AdsALst>
|
||||
<AdsACrf>1</AdsACrf>
|
||||
<AdsANop>0</AdsANop>
|
||||
<AdsANot>0</AdsANot>
|
||||
<AdsLLst>1</AdsLLst>
|
||||
<AdsLmap>1</AdsLmap>
|
||||
<AdsLcgr>1</AdsLcgr>
|
||||
<AdsLsym>1</AdsLsym>
|
||||
<AdsLszi>1</AdsLszi>
|
||||
<AdsLtoi>1</AdsLtoi>
|
||||
<AdsLsun>1</AdsLsun>
|
||||
<AdsLven>1</AdsLven>
|
||||
<AdsLsxf>1</AdsLsxf>
|
||||
<RvctClst>0</RvctClst>
|
||||
<GenPPlst>0</GenPPlst>
|
||||
<AdsCpuType>"Cortex-M4"</AdsCpuType>
|
||||
<RvctDeviceName></RvctDeviceName>
|
||||
<mOS>0</mOS>
|
||||
<uocRom>0</uocRom>
|
||||
<uocRam>0</uocRam>
|
||||
<hadIROM>1</hadIROM>
|
||||
<hadIRAM>1</hadIRAM>
|
||||
<hadXRAM>0</hadXRAM>
|
||||
<uocXRam>0</uocXRam>
|
||||
<RvdsVP>2</RvdsVP>
|
||||
<RvdsMve>0</RvdsMve>
|
||||
<RvdsCdeCp>0</RvdsCdeCp>
|
||||
<hadIRAM2>0</hadIRAM2>
|
||||
<hadIROM2>0</hadIROM2>
|
||||
<StupSel>8</StupSel>
|
||||
<useUlib>0</useUlib>
|
||||
<EndSel>0</EndSel>
|
||||
<uLtcg>0</uLtcg>
|
||||
<nSecure>0</nSecure>
|
||||
<RoSelD>3</RoSelD>
|
||||
<RwSelD>3</RwSelD>
|
||||
<CodeSel>0</CodeSel>
|
||||
<OptFeed>0</OptFeed>
|
||||
<NoZi1>0</NoZi1>
|
||||
<NoZi2>0</NoZi2>
|
||||
<NoZi3>0</NoZi3>
|
||||
<NoZi4>0</NoZi4>
|
||||
<NoZi5>0</NoZi5>
|
||||
<Ro1Chk>0</Ro1Chk>
|
||||
<Ro2Chk>0</Ro2Chk>
|
||||
<Ro3Chk>0</Ro3Chk>
|
||||
<Ir1Chk>1</Ir1Chk>
|
||||
<Ir2Chk>0</Ir2Chk>
|
||||
<Ra1Chk>0</Ra1Chk>
|
||||
<Ra2Chk>0</Ra2Chk>
|
||||
<Ra3Chk>0</Ra3Chk>
|
||||
<Im1Chk>1</Im1Chk>
|
||||
<Im2Chk>0</Im2Chk>
|
||||
<OnChipMemories>
|
||||
<Ocm1>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm1>
|
||||
<Ocm2>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm2>
|
||||
<Ocm3>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm3>
|
||||
<Ocm4>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm4>
|
||||
<Ocm5>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm5>
|
||||
<Ocm6>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm6>
|
||||
<IRAM>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x20000000</StartAddress>
|
||||
<Size>0x50000</Size>
|
||||
</IRAM>
|
||||
<IROM>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x8000000</StartAddress>
|
||||
<Size>0x100000</Size>
|
||||
</IROM>
|
||||
<XRAM>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</XRAM>
|
||||
<OCR_RVCT1>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT1>
|
||||
<OCR_RVCT2>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT2>
|
||||
<OCR_RVCT3>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT3>
|
||||
<OCR_RVCT4>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x8000000</StartAddress>
|
||||
<Size>0x100000</Size>
|
||||
</OCR_RVCT4>
|
||||
<OCR_RVCT5>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT5>
|
||||
<OCR_RVCT6>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT6>
|
||||
<OCR_RVCT7>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT7>
|
||||
<OCR_RVCT8>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT8>
|
||||
<OCR_RVCT9>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x20000000</StartAddress>
|
||||
<Size>0x50000</Size>
|
||||
</OCR_RVCT9>
|
||||
<OCR_RVCT10>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT10>
|
||||
</OnChipMemories>
|
||||
<RvctStartVector></RvctStartVector>
|
||||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>4</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
<Strict>0</Strict>
|
||||
<EnumInt>0</EnumInt>
|
||||
<PlainCh>0</PlainCh>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<wLevel>3</wLevel>
|
||||
<uThumb>0</uThumb>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<uC99>1</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
<v6WtE>0</v6WtE>
|
||||
<v6Rtti>0</v6Rtti>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define>USE_HAL_DRIVER,STM32L496xx,NUCLEO_STM32L496ZG</Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32L4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\examples\hello_world;..\..\TOS_CONFIG;..\..\..\..\net\at\include;..\..\..\..\kernel\hal\include;..\..\BSP\Hardware\Inc;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\third_party\flatbuffers\include;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\third_party\gemmlowp;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\third_party\kissfft;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\third_party\ruy;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow\lite\micro\tools\make\downloads;..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection</IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
<interw>1</interw>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<thumb>0</thumb>
|
||||
<SplitLS>0</SplitLS>
|
||||
<SwStkChk>0</SwStkChk>
|
||||
<NoWarn>0</NoWarn>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<useXO>0</useXO>
|
||||
<ClangAsOpt>4</ClangAsOpt>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath></IncludePath>
|
||||
</VariousControls>
|
||||
</Aads>
|
||||
<LDads>
|
||||
<umfTarg>1</umfTarg>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<noStLib>0</noStLib>
|
||||
<RepFail>1</RepFail>
|
||||
<useFile>0</useFile>
|
||||
<TextAddressRange>0x08000000</TextAddressRange>
|
||||
<DataAddressRange>0x20000000</DataAddressRange>
|
||||
<pXoBase></pXoBase>
|
||||
<ScatterFile></ScatterFile>
|
||||
<IncludeLibs></IncludeLibs>
|
||||
<IncludeLibsPath></IncludeLibsPath>
|
||||
<Misc></Misc>
|
||||
<LinkerInputFile></LinkerInputFile>
|
||||
<DisabledWarnings></DisabledWarnings>
|
||||
</LDads>
|
||||
</TargetArmAds>
|
||||
</TargetOption>
|
||||
<Groups>
|
||||
<Group>
|
||||
<GroupName>Application/MDK-ARM</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>startup_stm32l496xx.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>startup_stm32l496xx.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Application/User</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>main.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\main.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>gpio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\gpio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_msp.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\stm32l4xx_hal_msp.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_it.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\stm32l4xx_it.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>sys.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\sys.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\usart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>mcu_init.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\mcu_init.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>dcmi.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\dcmi.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>dma.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\dma.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>i2c.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\i2c.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>spi.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\spi.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tim.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\tim.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Drivers/STM32L4xx_HAL_Driver</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_uart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_uart_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_i2c.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_i2c_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_rcc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_rcc_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_flash.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_flash_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_flash_ramfunc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ramfunc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_gpio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_gpio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_dma.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_dma_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_pwr.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_pwr_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_cortex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cortex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_exti.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_exti.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_tim.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_tim_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_dcmi.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dcmi.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_spi.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32l4xx_hal_spi_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi_ex.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Drivers/CMSIS</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>system_stm32l4xx.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Src\system_stm32l4xx.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>tos/arch</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>tos_cpu.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>port_c.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_c.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>port_s.S</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_s.S</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>tos/kernel</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>tos_binary_heap.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_binary_heap.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_char_fifo.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_char_fifo.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_completion.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_completion.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_countdownlatch.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_countdownlatch.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_event.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_event.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_global.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_global.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_mail_queue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_mail_queue.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_message_queue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_message_queue.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_mmblk.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_mmblk.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_mmheap.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_mmheap.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_mutex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_mutex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_pend.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_pend.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_priority_mail_queue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_priority_mail_queue.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_priority_message_queue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_priority_message_queue.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_priority_queue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_priority_queue.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_ring_queue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_ring_queue.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_robin.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_robin.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_sched.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_sched.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_sem.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_sem.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_sys.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_sys.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_task.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_task.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_tick.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_tick.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_time.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_time.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tos_timer.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\kernel\core\tos_timer.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>tos/cmsis_os</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>cmsis_os.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\osal\cmsis_os\cmsis_os.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>hal</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>delay.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Hardware\Src\delay.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>lcd_2inch4.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Hardware\Src\lcd_2inch4.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>lcd_config.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Hardware\Src\lcd_config.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>ov2640.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Hardware\Src\ov2640.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>sccb.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\BSP\Hardware\Src\sccb.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>examples</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>tflitemicro_person_detection.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\examples\tflitemicro_person_detection\tflitemicro_person_detection.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>tensorflow</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>retarget.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\components\ai\tflite_micro\KEIL\retarget.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tensorflow_lite_micro_M4.lib</FileName>
|
||||
<FileType>4</FileType>
|
||||
<FilePath>..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow_lite_micro_M4.lib</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>detection_responder.cc</FileName>
|
||||
<FileType>8</FileType>
|
||||
<FilePath>..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection\detection_responder.cc</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>image_provider.cc</FileName>
|
||||
<FileType>8</FileType>
|
||||
<FilePath>..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection\image_provider.cc</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>main_functions.cc</FileName>
|
||||
<FileType>8</FileType>
|
||||
<FilePath>..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection\main_functions.cc</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>model_settings.cc</FileName>
|
||||
<FileType>8</FileType>
|
||||
<FilePath>..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection\model_settings.cc</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>person_detect_model_data.cc</FileName>
|
||||
<FileType>8</FileType>
|
||||
<FilePath>..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection\person_detect_model_data.cc</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>::CMSIS</GroupName>
|
||||
</Group>
|
||||
</Groups>
|
||||
</Target>
|
||||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<apis/>
|
||||
<components>
|
||||
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.4.0" condition="ARMv6_7_8-M Device">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="TencentOS_tiny"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
</components>
|
||||
<files/>
|
||||
</RTE>
|
||||
|
||||
<LayerInfo>
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</LayerInfo>
|
||||
|
||||
</Project>
|
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 207 KiB |
After Width: | Height: | Size: 188 KiB |
After Width: | Height: | Size: 204 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 535 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 215 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 113 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 82 KiB |
@@ -0,0 +1,450 @@
|
||||
;*******************************************************************************
|
||||
;* File Name : startup_stm32l496xx.s
|
||||
;* Author : MCD Application Team
|
||||
;* Description : STM32L496xx Ultra Low Power devices vector table for MDK-ARM toolchain.
|
||||
;* This module performs:
|
||||
;* - Set the initial SP
|
||||
;* - Set the initial PC == Reset_Handler
|
||||
;* - Set the vector table entries with the exceptions ISR address
|
||||
;* - Branches to __main in the C library (which eventually
|
||||
;* calls main()).
|
||||
;* After Reset the Cortex-M4 processor is in Thread mode,
|
||||
;* priority is Privileged, and the Stack is set to Main.
|
||||
;* <<< Use Configuration Wizard in Context Menu >>>
|
||||
;*******************************************************************************
|
||||
;*
|
||||
;* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
;* All rights reserved.</center></h2>
|
||||
;*
|
||||
;* This software component is licensed by ST under BSD 3-Clause license,
|
||||
;* the "License"; You may not use this file except in compliance with the
|
||||
;* License. You may obtain a copy of the License at:
|
||||
;* opensource.org/licenses/BSD-3-Clause
|
||||
;*
|
||||
;*******************************************************************************
|
||||
;
|
||||
; Amount of memory (in bytes) allocated for Stack
|
||||
; Tailor this value to your application needs
|
||||
; <h> Stack Configuration
|
||||
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
|
||||
Stack_Size EQU 0x400
|
||||
|
||||
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||
Stack_Mem SPACE Stack_Size
|
||||
__initial_sp
|
||||
|
||||
|
||||
; <h> Heap Configuration
|
||||
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
|
||||
Heap_Size EQU 0x200
|
||||
|
||||
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||
__heap_base
|
||||
Heap_Mem SPACE Heap_Size
|
||||
__heap_limit
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
|
||||
|
||||
; Vector Table Mapped to Address 0 at Reset
|
||||
AREA RESET, DATA, READONLY
|
||||
EXPORT __Vectors
|
||||
EXPORT __Vectors_End
|
||||
EXPORT __Vectors_Size
|
||||
|
||||
__Vectors DCD __initial_sp ; Top of Stack
|
||||
DCD Reset_Handler ; Reset Handler
|
||||
DCD NMI_Handler ; NMI Handler
|
||||
DCD HardFault_Handler ; Hard Fault Handler
|
||||
DCD MemManage_Handler ; MPU Fault Handler
|
||||
DCD BusFault_Handler ; Bus Fault Handler
|
||||
DCD UsageFault_Handler ; Usage Fault Handler
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD SVC_Handler ; SVCall Handler
|
||||
DCD DebugMon_Handler ; Debug Monitor Handler
|
||||
DCD 0 ; Reserved
|
||||
DCD PendSV_Handler ; PendSV Handler
|
||||
DCD SysTick_Handler ; SysTick Handler
|
||||
|
||||
; External Interrupts
|
||||
DCD WWDG_IRQHandler ; Window WatchDog
|
||||
DCD PVD_PVM_IRQHandler ; PVD/PVM1/PVM2/PVM3/PVM4 through EXTI Line detection
|
||||
DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
|
||||
DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
|
||||
DCD FLASH_IRQHandler ; FLASH
|
||||
DCD RCC_IRQHandler ; RCC
|
||||
DCD EXTI0_IRQHandler ; EXTI Line0
|
||||
DCD EXTI1_IRQHandler ; EXTI Line1
|
||||
DCD EXTI2_IRQHandler ; EXTI Line2
|
||||
DCD EXTI3_IRQHandler ; EXTI Line3
|
||||
DCD EXTI4_IRQHandler ; EXTI Line4
|
||||
DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
|
||||
DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
|
||||
DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
|
||||
DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
|
||||
DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
|
||||
DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
|
||||
DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
|
||||
DCD ADC1_2_IRQHandler ; ADC1, ADC2
|
||||
DCD CAN1_TX_IRQHandler ; CAN1 TX
|
||||
DCD CAN1_RX0_IRQHandler ; CAN1 RX0
|
||||
DCD CAN1_RX1_IRQHandler ; CAN1 RX1
|
||||
DCD CAN1_SCE_IRQHandler ; CAN1 SCE
|
||||
DCD EXTI9_5_IRQHandler ; External Line[9:5]s
|
||||
DCD TIM1_BRK_TIM15_IRQHandler ; TIM1 Break and TIM15
|
||||
DCD TIM1_UP_TIM16_IRQHandler ; TIM1 Update and TIM16
|
||||
DCD TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Commutation and TIM17
|
||||
DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
|
||||
DCD TIM2_IRQHandler ; TIM2
|
||||
DCD TIM3_IRQHandler ; TIM3
|
||||
DCD TIM4_IRQHandler ; TIM4
|
||||
DCD I2C1_EV_IRQHandler ; I2C1 Event
|
||||
DCD I2C1_ER_IRQHandler ; I2C1 Error
|
||||
DCD I2C2_EV_IRQHandler ; I2C2 Event
|
||||
DCD I2C2_ER_IRQHandler ; I2C2 Error
|
||||
DCD SPI1_IRQHandler ; SPI1
|
||||
DCD SPI2_IRQHandler ; SPI2
|
||||
DCD USART1_IRQHandler ; USART1
|
||||
DCD USART2_IRQHandler ; USART2
|
||||
DCD USART3_IRQHandler ; USART3
|
||||
DCD EXTI15_10_IRQHandler ; External Line[15:10]
|
||||
DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
|
||||
DCD DFSDM1_FLT3_IRQHandler ; DFSDM1 Filter 3 global Interrupt
|
||||
DCD TIM8_BRK_IRQHandler ; TIM8 Break Interrupt
|
||||
DCD TIM8_UP_IRQHandler ; TIM8 Update Interrupt
|
||||
DCD TIM8_TRG_COM_IRQHandler ; TIM8 Trigger and Commutation Interrupt
|
||||
DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt
|
||||
DCD ADC3_IRQHandler ; ADC3 global Interrupt
|
||||
DCD FMC_IRQHandler ; FMC
|
||||
DCD SDMMC1_IRQHandler ; SDMMC1
|
||||
DCD TIM5_IRQHandler ; TIM5
|
||||
DCD SPI3_IRQHandler ; SPI3
|
||||
DCD UART4_IRQHandler ; UART4
|
||||
DCD UART5_IRQHandler ; UART5
|
||||
DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors
|
||||
DCD TIM7_IRQHandler ; TIM7
|
||||
DCD DMA2_Channel1_IRQHandler ; DMA2 Channel 1
|
||||
DCD DMA2_Channel2_IRQHandler ; DMA2 Channel 2
|
||||
DCD DMA2_Channel3_IRQHandler ; DMA2 Channel 3
|
||||
DCD DMA2_Channel4_IRQHandler ; DMA2 Channel 4
|
||||
DCD DMA2_Channel5_IRQHandler ; DMA2 Channel 5
|
||||
DCD DFSDM1_FLT0_IRQHandler ; DFSDM1 Filter 0 global Interrupt
|
||||
DCD DFSDM1_FLT1_IRQHandler ; DFSDM1 Filter 1 global Interrupt
|
||||
DCD DFSDM1_FLT2_IRQHandler ; DFSDM1 Filter 2 global Interrupt
|
||||
DCD COMP_IRQHandler ; COMP Interrupt
|
||||
DCD LPTIM1_IRQHandler ; LP TIM1 interrupt
|
||||
DCD LPTIM2_IRQHandler ; LP TIM2 interrupt
|
||||
DCD OTG_FS_IRQHandler ; USB OTG FS
|
||||
DCD DMA2_Channel6_IRQHandler ; DMA2 Channel 6
|
||||
DCD DMA2_Channel7_IRQHandler ; DMA2 Channel 7
|
||||
DCD LPUART1_IRQHandler ; LP UART1 interrupt
|
||||
DCD QUADSPI_IRQHandler ; Quad SPI global interrupt
|
||||
DCD I2C3_EV_IRQHandler ; I2C3 event
|
||||
DCD I2C3_ER_IRQHandler ; I2C3 error
|
||||
DCD SAI1_IRQHandler ; Serial Audio Interface 1 global interrupt
|
||||
DCD SAI2_IRQHandler ; Serial Audio Interface 2 global interrupt
|
||||
DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt
|
||||
DCD TSC_IRQHandler ; Touch Sense Controller global interrupt
|
||||
DCD LCD_IRQHandler ; LCD global interrupt
|
||||
DCD 0 ; Reserved
|
||||
DCD RNG_IRQHandler ; RNG global interrupt
|
||||
DCD FPU_IRQHandler ; FPU
|
||||
DCD CRS_IRQHandler ; CRS error
|
||||
DCD I2C4_EV_IRQHandler ; I2C4 event
|
||||
DCD I2C4_ER_IRQHandler ; I2C4 error
|
||||
DCD DCMI_IRQHandler ; DCMI global interrupt
|
||||
DCD CAN2_TX_IRQHandler ; CAN2 TX
|
||||
DCD CAN2_RX0_IRQHandler ; CAN2 RX0
|
||||
DCD CAN2_RX1_IRQHandler ; CAN2 RX1
|
||||
DCD CAN2_SCE_IRQHandler ; CAN2 SCE
|
||||
DCD DMA2D_IRQHandler ; DMA2D global interrupt
|
||||
|
||||
__Vectors_End
|
||||
|
||||
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
; Reset handler
|
||||
Reset_Handler PROC
|
||||
EXPORT Reset_Handler [WEAK]
|
||||
IMPORT SystemInit
|
||||
IMPORT __main
|
||||
|
||||
LDR R0, =SystemInit
|
||||
BLX R0
|
||||
LDR R0, =__main
|
||||
BX R0
|
||||
ENDP
|
||||
|
||||
; Dummy Exception Handlers (infinite loops which can be modified)
|
||||
|
||||
NMI_Handler PROC
|
||||
EXPORT NMI_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
HardFault_Handler\
|
||||
PROC
|
||||
EXPORT HardFault_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
MemManage_Handler\
|
||||
PROC
|
||||
EXPORT MemManage_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
BusFault_Handler\
|
||||
PROC
|
||||
EXPORT BusFault_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
UsageFault_Handler\
|
||||
PROC
|
||||
EXPORT UsageFault_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
SVC_Handler PROC
|
||||
EXPORT SVC_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
DebugMon_Handler\
|
||||
PROC
|
||||
EXPORT DebugMon_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
PendSV_Handler PROC
|
||||
EXPORT PendSV_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
SysTick_Handler PROC
|
||||
EXPORT SysTick_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
|
||||
Default_Handler PROC
|
||||
|
||||
EXPORT WWDG_IRQHandler [WEAK]
|
||||
EXPORT PVD_PVM_IRQHandler [WEAK]
|
||||
EXPORT TAMP_STAMP_IRQHandler [WEAK]
|
||||
EXPORT RTC_WKUP_IRQHandler [WEAK]
|
||||
EXPORT FLASH_IRQHandler [WEAK]
|
||||
EXPORT RCC_IRQHandler [WEAK]
|
||||
EXPORT EXTI0_IRQHandler [WEAK]
|
||||
EXPORT EXTI1_IRQHandler [WEAK]
|
||||
EXPORT EXTI2_IRQHandler [WEAK]
|
||||
EXPORT EXTI3_IRQHandler [WEAK]
|
||||
EXPORT EXTI4_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel1_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel2_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel3_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel4_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel5_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel6_IRQHandler [WEAK]
|
||||
EXPORT DMA1_Channel7_IRQHandler [WEAK]
|
||||
EXPORT ADC1_2_IRQHandler [WEAK]
|
||||
EXPORT CAN1_TX_IRQHandler [WEAK]
|
||||
EXPORT CAN1_RX0_IRQHandler [WEAK]
|
||||
EXPORT CAN1_RX1_IRQHandler [WEAK]
|
||||
EXPORT CAN1_SCE_IRQHandler [WEAK]
|
||||
EXPORT EXTI9_5_IRQHandler [WEAK]
|
||||
EXPORT TIM1_BRK_TIM15_IRQHandler [WEAK]
|
||||
EXPORT TIM1_UP_TIM16_IRQHandler [WEAK]
|
||||
EXPORT TIM1_TRG_COM_TIM17_IRQHandler [WEAK]
|
||||
EXPORT TIM1_CC_IRQHandler [WEAK]
|
||||
EXPORT TIM2_IRQHandler [WEAK]
|
||||
EXPORT TIM3_IRQHandler [WEAK]
|
||||
EXPORT TIM4_IRQHandler [WEAK]
|
||||
EXPORT I2C1_EV_IRQHandler [WEAK]
|
||||
EXPORT I2C1_ER_IRQHandler [WEAK]
|
||||
EXPORT I2C2_EV_IRQHandler [WEAK]
|
||||
EXPORT I2C2_ER_IRQHandler [WEAK]
|
||||
EXPORT SPI1_IRQHandler [WEAK]
|
||||
EXPORT SPI2_IRQHandler [WEAK]
|
||||
EXPORT USART1_IRQHandler [WEAK]
|
||||
EXPORT USART2_IRQHandler [WEAK]
|
||||
EXPORT USART3_IRQHandler [WEAK]
|
||||
EXPORT EXTI15_10_IRQHandler [WEAK]
|
||||
EXPORT RTC_Alarm_IRQHandler [WEAK]
|
||||
EXPORT DFSDM1_FLT3_IRQHandler [WEAK]
|
||||
EXPORT TIM8_BRK_IRQHandler [WEAK]
|
||||
EXPORT TIM8_UP_IRQHandler [WEAK]
|
||||
EXPORT TIM8_TRG_COM_IRQHandler [WEAK]
|
||||
EXPORT TIM8_CC_IRQHandler [WEAK]
|
||||
EXPORT ADC3_IRQHandler [WEAK]
|
||||
EXPORT FMC_IRQHandler [WEAK]
|
||||
EXPORT SDMMC1_IRQHandler [WEAK]
|
||||
EXPORT TIM5_IRQHandler [WEAK]
|
||||
EXPORT SPI3_IRQHandler [WEAK]
|
||||
EXPORT UART4_IRQHandler [WEAK]
|
||||
EXPORT UART5_IRQHandler [WEAK]
|
||||
EXPORT TIM6_DAC_IRQHandler [WEAK]
|
||||
EXPORT TIM7_IRQHandler [WEAK]
|
||||
EXPORT DMA2_Channel1_IRQHandler [WEAK]
|
||||
EXPORT DMA2_Channel2_IRQHandler [WEAK]
|
||||
EXPORT DMA2_Channel3_IRQHandler [WEAK]
|
||||
EXPORT DMA2_Channel4_IRQHandler [WEAK]
|
||||
EXPORT DMA2_Channel5_IRQHandler [WEAK]
|
||||
EXPORT DFSDM1_FLT0_IRQHandler [WEAK]
|
||||
EXPORT DFSDM1_FLT1_IRQHandler [WEAK]
|
||||
EXPORT DFSDM1_FLT2_IRQHandler [WEAK]
|
||||
EXPORT COMP_IRQHandler [WEAK]
|
||||
EXPORT LPTIM1_IRQHandler [WEAK]
|
||||
EXPORT LPTIM2_IRQHandler [WEAK]
|
||||
EXPORT OTG_FS_IRQHandler [WEAK]
|
||||
EXPORT DMA2_Channel6_IRQHandler [WEAK]
|
||||
EXPORT DMA2_Channel7_IRQHandler [WEAK]
|
||||
EXPORT LPUART1_IRQHandler [WEAK]
|
||||
EXPORT QUADSPI_IRQHandler [WEAK]
|
||||
EXPORT I2C3_EV_IRQHandler [WEAK]
|
||||
EXPORT I2C3_ER_IRQHandler [WEAK]
|
||||
EXPORT SAI1_IRQHandler [WEAK]
|
||||
EXPORT SAI2_IRQHandler [WEAK]
|
||||
EXPORT SWPMI1_IRQHandler [WEAK]
|
||||
EXPORT TSC_IRQHandler [WEAK]
|
||||
EXPORT LCD_IRQHandler [WEAK]
|
||||
EXPORT RNG_IRQHandler [WEAK]
|
||||
EXPORT FPU_IRQHandler [WEAK]
|
||||
EXPORT CRS_IRQHandler [WEAK]
|
||||
EXPORT I2C4_EV_IRQHandler [WEAK]
|
||||
EXPORT I2C4_ER_IRQHandler [WEAK]
|
||||
EXPORT DCMI_IRQHandler [WEAK]
|
||||
EXPORT CAN2_TX_IRQHandler [WEAK]
|
||||
EXPORT CAN2_RX0_IRQHandler [WEAK]
|
||||
EXPORT CAN2_RX1_IRQHandler [WEAK]
|
||||
EXPORT CAN2_SCE_IRQHandler [WEAK]
|
||||
EXPORT DMA2D_IRQHandler [WEAK]
|
||||
|
||||
WWDG_IRQHandler
|
||||
PVD_PVM_IRQHandler
|
||||
TAMP_STAMP_IRQHandler
|
||||
RTC_WKUP_IRQHandler
|
||||
FLASH_IRQHandler
|
||||
RCC_IRQHandler
|
||||
EXTI0_IRQHandler
|
||||
EXTI1_IRQHandler
|
||||
EXTI2_IRQHandler
|
||||
EXTI3_IRQHandler
|
||||
EXTI4_IRQHandler
|
||||
DMA1_Channel1_IRQHandler
|
||||
DMA1_Channel2_IRQHandler
|
||||
DMA1_Channel3_IRQHandler
|
||||
DMA1_Channel4_IRQHandler
|
||||
DMA1_Channel5_IRQHandler
|
||||
DMA1_Channel6_IRQHandler
|
||||
DMA1_Channel7_IRQHandler
|
||||
ADC1_2_IRQHandler
|
||||
CAN1_TX_IRQHandler
|
||||
CAN1_RX0_IRQHandler
|
||||
CAN1_RX1_IRQHandler
|
||||
CAN1_SCE_IRQHandler
|
||||
EXTI9_5_IRQHandler
|
||||
TIM1_BRK_TIM15_IRQHandler
|
||||
TIM1_UP_TIM16_IRQHandler
|
||||
TIM1_TRG_COM_TIM17_IRQHandler
|
||||
TIM1_CC_IRQHandler
|
||||
TIM2_IRQHandler
|
||||
TIM3_IRQHandler
|
||||
TIM4_IRQHandler
|
||||
I2C1_EV_IRQHandler
|
||||
I2C1_ER_IRQHandler
|
||||
I2C2_EV_IRQHandler
|
||||
I2C2_ER_IRQHandler
|
||||
SPI1_IRQHandler
|
||||
SPI2_IRQHandler
|
||||
USART1_IRQHandler
|
||||
USART2_IRQHandler
|
||||
USART3_IRQHandler
|
||||
EXTI15_10_IRQHandler
|
||||
RTC_Alarm_IRQHandler
|
||||
DFSDM1_FLT3_IRQHandler
|
||||
TIM8_BRK_IRQHandler
|
||||
TIM8_UP_IRQHandler
|
||||
TIM8_TRG_COM_IRQHandler
|
||||
TIM8_CC_IRQHandler
|
||||
ADC3_IRQHandler
|
||||
FMC_IRQHandler
|
||||
SDMMC1_IRQHandler
|
||||
TIM5_IRQHandler
|
||||
SPI3_IRQHandler
|
||||
UART4_IRQHandler
|
||||
UART5_IRQHandler
|
||||
TIM6_DAC_IRQHandler
|
||||
TIM7_IRQHandler
|
||||
DMA2_Channel1_IRQHandler
|
||||
DMA2_Channel2_IRQHandler
|
||||
DMA2_Channel3_IRQHandler
|
||||
DMA2_Channel4_IRQHandler
|
||||
DMA2_Channel5_IRQHandler
|
||||
DFSDM1_FLT0_IRQHandler
|
||||
DFSDM1_FLT1_IRQHandler
|
||||
DFSDM1_FLT2_IRQHandler
|
||||
COMP_IRQHandler
|
||||
LPTIM1_IRQHandler
|
||||
LPTIM2_IRQHandler
|
||||
OTG_FS_IRQHandler
|
||||
DMA2_Channel6_IRQHandler
|
||||
DMA2_Channel7_IRQHandler
|
||||
LPUART1_IRQHandler
|
||||
QUADSPI_IRQHandler
|
||||
I2C3_EV_IRQHandler
|
||||
I2C3_ER_IRQHandler
|
||||
SAI1_IRQHandler
|
||||
SAI2_IRQHandler
|
||||
SWPMI1_IRQHandler
|
||||
TSC_IRQHandler
|
||||
LCD_IRQHandler
|
||||
RNG_IRQHandler
|
||||
FPU_IRQHandler
|
||||
CRS_IRQHandler
|
||||
I2C4_EV_IRQHandler
|
||||
I2C4_ER_IRQHandler
|
||||
DCMI_IRQHandler
|
||||
CAN2_TX_IRQHandler
|
||||
CAN2_RX0_IRQHandler
|
||||
CAN2_RX1_IRQHandler
|
||||
CAN2_SCE_IRQHandler
|
||||
DMA2D_IRQHandler
|
||||
|
||||
B .
|
||||
|
||||
ENDP
|
||||
|
||||
ALIGN
|
||||
|
||||
;*******************************************************************************
|
||||
; User Stack and Heap initialization
|
||||
;*******************************************************************************
|
||||
IF :DEF:__MICROLIB
|
||||
|
||||
EXPORT __initial_sp
|
||||
EXPORT __heap_base
|
||||
EXPORT __heap_limit
|
||||
|
||||
ELSE
|
||||
|
||||
IMPORT __use_two_region_memory
|
||||
EXPORT __user_initial_stackheap
|
||||
|
||||
__user_initial_stackheap
|
||||
|
||||
LDR R0, = Heap_Mem
|
||||
LDR R1, =(Stack_Mem + Stack_Size)
|
||||
LDR R2, = (Heap_Mem + Heap_Size)
|
||||
LDR R3, = Stack_Mem
|
||||
BX LR
|
||||
|
||||
ALIGN
|
||||
|
||||
ENDIF
|
||||
|
||||
END
|
||||
|
||||
;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****
|
@@ -0,0 +1,70 @@
|
||||
// File: STM32L43x_44x_45x_46x.dbgconf
|
||||
// Version: 1.0.0
|
||||
// Note: refer to STM32L43xxx STM32L44xxx STM32L45xxx STM32L46xxx Reference manual (RM0394)
|
||||
// refer to STM32L431xx STM32L432xx STM32L433xx STM32L442xx STM32L443xx STM32L451xx STM32L452xx STM32L462xx datasheets
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
|
||||
// <h> Debug MCU configuration register (DBGMCU_CR)
|
||||
// <o.2> DBG_STANDBY <i> Debug Standby mode
|
||||
// <o.1> DBG_STOP <i> Debug Stop mode
|
||||
// <o.0> DBG_SLEEP <i> Debug Sleep mode
|
||||
// </h>
|
||||
DbgMCU_CR = 0x00000007;
|
||||
|
||||
// <h> Debug MCU APB1 freeze register1 (DBGMCU_APB1FZR1)
|
||||
// <i> Reserved bits must be kept at reset value
|
||||
// <o.31> DBG_LPTIM1_STOP <i> LPTIM1 counter stopped when core is halted
|
||||
// <o.25> DBG_CAN1_STOP <i> bxCAN1 stopped when core is halted
|
||||
// <o.23> DBG_I2C3_STOP <i> I2C3 SMBUS timeout counter stopped when core is halted
|
||||
// <o.22> DBG_I2C2_STOP <i> I2C2 SMBUS timeout counter stopped when core is halted
|
||||
// <o.21> DBG_I2C1_STOP <i> I2C1 SMBUS timeout counter stopped when core is halted
|
||||
// <o.12> DBG_IWDG_STOP <i> Independent watchdog counter stopped when core is halted
|
||||
// <o.11> DBG_WWDG_STOP <i> Window watchdog counter stopped when core is halted
|
||||
// <o.10> DBG_RTC_STOP <i> RTC counter stopped when core is halted
|
||||
// <o.5> DBG_TIM7_STOP <i> TIM7 counter stopped when core is halted
|
||||
// <o.4> DBG_TIM6_STOP <i> TIM6 counter stopped when core is halted
|
||||
// <o.0> DBG_TIM2_STOP <i> TIM2 counter stopped when core is halted
|
||||
// </h>
|
||||
DbgMCU_APB1_Fz1 = 0x00000000;
|
||||
|
||||
// <h> Debug MCU APB1 freeze register 2 (DBGMCU_APB1FZR2)
|
||||
// <i> Reserved bits must be kept at reset value
|
||||
// <o.5> DBG_LPTIM2_STOP <i> LPTIM2 counter stopped when core is halted
|
||||
// </h>
|
||||
DbgMCU_APB1_Fz2 = 0x00000000;
|
||||
|
||||
// <h> Debug MCU APB2 freeze register (DBGMCU_APB2FZR)
|
||||
// <i> Reserved bits must be kept at reset value
|
||||
// <o.17> DBG_TIM16_STOP <i> TIM16 counter stopped when core is halted
|
||||
// <o.16> DBG_TIM15_STOP <i> TIM15 counter stopped when core is halted
|
||||
// <o.11> DBG_TIM1_STOP <i> TIM1 counter stopped when core is halted
|
||||
// </h>
|
||||
DbgMCU_APB2_Fz = 0x00000000;
|
||||
|
||||
// <h> TPIU Pin Routing (TRACECLK fixed on Pin PE2)
|
||||
// <i> TRACECLK: Pin PE2
|
||||
// <o1> TRACED0
|
||||
// <i> ETM Trace Data 0
|
||||
// <0x00040003=> Pin PE3
|
||||
// <0x00020001=> Pin PC1
|
||||
// <o2> TRACED1
|
||||
// <i> ETM Trace Data 1
|
||||
// <0x00040004=> Pin PE4
|
||||
// <0x0002000A=> Pin PC10
|
||||
// <o3> TRACED2
|
||||
// <i> ETM Trace Data 2
|
||||
// <0x00040005=> Pin PE5
|
||||
// <0x00030002=> Pin PD2
|
||||
// <o4> TRACED3
|
||||
// <i> ETM Trace Data 3
|
||||
// <0x00040006=> Pin PE6
|
||||
// <0x0002000C=> Pin PC12
|
||||
// </h>
|
||||
TraceClk_Pin = 0x00040002;
|
||||
TraceD0_Pin = 0x00040003;
|
||||
TraceD1_Pin = 0x00040004;
|
||||
TraceD2_Pin = 0x00040005;
|
||||
TraceD3_Pin = 0x00040006;
|
||||
|
||||
// <<< end of configuration section >>>
|
@@ -0,0 +1,21 @@
|
||||
|
||||
/*
|
||||
* Auto generated Run-Time-Environment Configuration File
|
||||
* *** Do not modify ! ***
|
||||
*
|
||||
* Project: 'TencentOS_tiny'
|
||||
* Target: 'TencentOS_tiny'
|
||||
*/
|
||||
|
||||
#ifndef RTE_COMPONENTS_H
|
||||
#define RTE_COMPONENTS_H
|
||||
|
||||
|
||||
/*
|
||||
* Define the Device Header File:
|
||||
*/
|
||||
#define CMSIS_device_header "stm32l4xx.h"
|
||||
|
||||
|
||||
|
||||
#endif /* RTE_COMPONENTS_H */
|
@@ -0,0 +1,70 @@
|
||||
// File: STM32L43x_44x_45x_46x.dbgconf
|
||||
// Version: 1.0.0
|
||||
// Note: refer to STM32L43xxx STM32L44xxx STM32L45xxx STM32L46xxx Reference manual (RM0394)
|
||||
// refer to STM32L431xx STM32L432xx STM32L433xx STM32L442xx STM32L443xx STM32L451xx STM32L452xx STM32L462xx datasheets
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
|
||||
// <h> Debug MCU configuration register (DBGMCU_CR)
|
||||
// <o.2> DBG_STANDBY <i> Debug Standby mode
|
||||
// <o.1> DBG_STOP <i> Debug Stop mode
|
||||
// <o.0> DBG_SLEEP <i> Debug Sleep mode
|
||||
// </h>
|
||||
DbgMCU_CR = 0x00000007;
|
||||
|
||||
// <h> Debug MCU APB1 freeze register1 (DBGMCU_APB1FZR1)
|
||||
// <i> Reserved bits must be kept at reset value
|
||||
// <o.31> DBG_LPTIM1_STOP <i> LPTIM1 counter stopped when core is halted
|
||||
// <o.25> DBG_CAN1_STOP <i> bxCAN1 stopped when core is halted
|
||||
// <o.23> DBG_I2C3_STOP <i> I2C3 SMBUS timeout counter stopped when core is halted
|
||||
// <o.22> DBG_I2C2_STOP <i> I2C2 SMBUS timeout counter stopped when core is halted
|
||||
// <o.21> DBG_I2C1_STOP <i> I2C1 SMBUS timeout counter stopped when core is halted
|
||||
// <o.12> DBG_IWDG_STOP <i> Independent watchdog counter stopped when core is halted
|
||||
// <o.11> DBG_WWDG_STOP <i> Window watchdog counter stopped when core is halted
|
||||
// <o.10> DBG_RTC_STOP <i> RTC counter stopped when core is halted
|
||||
// <o.5> DBG_TIM7_STOP <i> TIM7 counter stopped when core is halted
|
||||
// <o.4> DBG_TIM6_STOP <i> TIM6 counter stopped when core is halted
|
||||
// <o.0> DBG_TIM2_STOP <i> TIM2 counter stopped when core is halted
|
||||
// </h>
|
||||
DbgMCU_APB1_Fz1 = 0x00000000;
|
||||
|
||||
// <h> Debug MCU APB1 freeze register 2 (DBGMCU_APB1FZR2)
|
||||
// <i> Reserved bits must be kept at reset value
|
||||
// <o.5> DBG_LPTIM2_STOP <i> LPTIM2 counter stopped when core is halted
|
||||
// </h>
|
||||
DbgMCU_APB1_Fz2 = 0x00000000;
|
||||
|
||||
// <h> Debug MCU APB2 freeze register (DBGMCU_APB2FZR)
|
||||
// <i> Reserved bits must be kept at reset value
|
||||
// <o.17> DBG_TIM16_STOP <i> TIM16 counter stopped when core is halted
|
||||
// <o.16> DBG_TIM15_STOP <i> TIM15 counter stopped when core is halted
|
||||
// <o.11> DBG_TIM1_STOP <i> TIM1 counter stopped when core is halted
|
||||
// </h>
|
||||
DbgMCU_APB2_Fz = 0x00000000;
|
||||
|
||||
// <h> TPIU Pin Routing (TRACECLK fixed on Pin PE2)
|
||||
// <i> TRACECLK: Pin PE2
|
||||
// <o1> TRACED0
|
||||
// <i> ETM Trace Data 0
|
||||
// <0x00040003=> Pin PE3
|
||||
// <0x00020001=> Pin PC1
|
||||
// <o2> TRACED1
|
||||
// <i> ETM Trace Data 1
|
||||
// <0x00040004=> Pin PE4
|
||||
// <0x0002000A=> Pin PC10
|
||||
// <o3> TRACED2
|
||||
// <i> ETM Trace Data 2
|
||||
// <0x00040005=> Pin PE5
|
||||
// <0x00030002=> Pin PD2
|
||||
// <o4> TRACED3
|
||||
// <i> ETM Trace Data 3
|
||||
// <0x00040006=> Pin PE6
|
||||
// <0x0002000C=> Pin PC12
|
||||
// </h>
|
||||
TraceClk_Pin = 0x00040002;
|
||||
TraceD0_Pin = 0x00040003;
|
||||
TraceD1_Pin = 0x00040004;
|
||||
TraceD2_Pin = 0x00040005;
|
||||
TraceD3_Pin = 0x00040006;
|
||||
|
||||
// <<< end of configuration section >>>
|
@@ -0,0 +1,21 @@
|
||||
|
||||
/*
|
||||
* Auto generated Run-Time-Environment Configuration File
|
||||
* *** Do not modify ! ***
|
||||
*
|
||||
* Project: 'TencentOS_tiny'
|
||||
* Target: 'TencentOS_tiny'
|
||||
*/
|
||||
|
||||
#ifndef RTE_COMPONENTS_H
|
||||
#define RTE_COMPONENTS_H
|
||||
|
||||
|
||||
/*
|
||||
* Define the Device Header File:
|
||||
*/
|
||||
#define CMSIS_device_header "stm32l4xx.h"
|
||||
|
||||
|
||||
|
||||
#endif /* RTE_COMPONENTS_H */
|