kopia lustrzana https://github.com/sq2ips/m20-custom-firmware
added images, gps tests, cleanup.
rodzic
3bd0a08553
commit
8a55be03e0
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "linux-gcc-x64",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"compilerPath": "/usr/bin/gcc",
|
||||
"cStandard": "${default}",
|
||||
"cppStandard": "${default}",
|
||||
"intelliSenseMode": "linux-gcc-x64",
|
||||
"compilerArgs": [
|
||||
""
|
||||
]
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "C/C++ Runner: Debug Session",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
"cwd": "/home/pawel/Pobrane",
|
||||
"program": "/home/pawel/Pobrane/build/Debug/outDebug",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"C_Cpp_Runner.cCompilerPath": "gcc",
|
||||
"C_Cpp_Runner.cppCompilerPath": "g++",
|
||||
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||
"C_Cpp_Runner.cStandard": "",
|
||||
"C_Cpp_Runner.cppStandard": "",
|
||||
"C_Cpp_Runner.msvcBatchPath": "",
|
||||
"C_Cpp_Runner.useMsvc": false,
|
||||
"C_Cpp_Runner.warnings": [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wpedantic",
|
||||
"-Wshadow",
|
||||
"-Wformat=2",
|
||||
"-Wcast-align",
|
||||
"-Wconversion",
|
||||
"-Wsign-conversion",
|
||||
"-Wnull-dereference"
|
||||
],
|
||||
"C_Cpp_Runner.msvcWarnings": [
|
||||
"/W4",
|
||||
"/permissive-",
|
||||
"/w14242",
|
||||
"/w14287",
|
||||
"/w14296",
|
||||
"/w14311",
|
||||
"/w14826",
|
||||
"/w44062",
|
||||
"/w44242",
|
||||
"/w14905",
|
||||
"/w14906",
|
||||
"/w14263",
|
||||
"/w44265",
|
||||
"/w14928"
|
||||
],
|
||||
"C_Cpp_Runner.enableWarnings": true,
|
||||
"C_Cpp_Runner.warningsAsError": false,
|
||||
"C_Cpp_Runner.compilerArgs": [],
|
||||
"C_Cpp_Runner.linkerArgs": [],
|
||||
"C_Cpp_Runner.includePaths": [],
|
||||
"C_Cpp_Runner.includeSearch": [
|
||||
"*",
|
||||
"**/*"
|
||||
],
|
||||
"C_Cpp_Runner.excludeSearch": [
|
||||
"**/build",
|
||||
"**/build/**",
|
||||
"**/.*",
|
||||
"**/.*/**",
|
||||
"**/.vscode",
|
||||
"**/.vscode/**"
|
||||
],
|
||||
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||
"C_Cpp_Runner.showCompilationTime": false,
|
||||
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* gps.h
|
||||
*
|
||||
* Created on: Mar 19, 2024
|
||||
* Author: pawel
|
||||
*/
|
||||
|
||||
#ifndef INC_GPS_H_
|
||||
#define INC_GPS_H_
|
||||
#endif /* INC_GPS_H_ */
|
||||
|
||||
#include "main.h"
|
||||
|
|
@ -1,517 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* @file lps22hb.h
|
||||
* @author MCD Application Team
|
||||
* @brief LPS22HB header driver file
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <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
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __LPS22HB__H
|
||||
#define __LPS22HB__H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "psensor.h"
|
||||
#include "tsensor.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Component
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup LPS22HB
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup LPS22HB_Exported_Macros LPS22HB Exported Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Bitfield positioning.
|
||||
*/
|
||||
#define LPS22HB_BIT(x) ((uint8_t)x)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/** @defgroup LPS22HB_Exported_Constants LPS22HB Exported Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Device Identification register.
|
||||
* Read
|
||||
* Default value: 0xB1
|
||||
* 7:0 This read-only register contains the device identifier that, for LPS22HB, is set to B1h.
|
||||
*/
|
||||
|
||||
#define LPS22HB_WHO_AM_I_REG (uint8_t)0x0F
|
||||
|
||||
/**
|
||||
* @brief Device Identification value.
|
||||
*/
|
||||
#define LPS22HB_WHO_AM_I_VAL (uint8_t)0xB1
|
||||
|
||||
/**
|
||||
* @brief Reference Pressure Register(LSB data)
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7:0 REFL7-0: Lower part of the reference pressure value that
|
||||
* is sum to the sensor output pressure.
|
||||
*/
|
||||
#define LPS22HB_REF_P_XL_REG (uint8_t)0x15
|
||||
|
||||
/**
|
||||
* @brief Reference Pressure Register (Middle data)
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7:0 REFL15-8: Middle part of the reference pressure value that
|
||||
* is sum to the sensor output pressure.
|
||||
*/
|
||||
#define LPS22HB_REF_P_L_REG (uint8_t)0x16
|
||||
|
||||
/**
|
||||
* @brief Reference Pressure Register (MSB data)
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7:0 REFL23-16 Higest part of the reference pressure value that
|
||||
* is sum to the sensor output pressure.
|
||||
*/
|
||||
#define LPS22HB_REF_P_H_REG (uint8_t)0x17
|
||||
|
||||
/**
|
||||
* @brief Pressure and temperature resolution mode Register
|
||||
* Read/write
|
||||
* Default value: 0x05
|
||||
* 7:2 These bits must be set to 0 for proper operation of the device
|
||||
* 1: Reserved
|
||||
* 0 LC_EN: Low Current Mode Enable. Default 0
|
||||
*/
|
||||
#define LPS22HB_RES_CONF_REG (uint8_t)0x1A
|
||||
#define LPS22HB_LCEN_MASK (uint8_t)0x01
|
||||
|
||||
/**
|
||||
* @brief Control Register 1
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7: This bit must be set to 0 for proper operation of the device
|
||||
* 6:4 ODR2, ODR1, ODR0: output data rate selection.Default 000
|
||||
* ODR2 | ODR1 | ODR0 | Pressure output data-rate(Hz) | Pressure output data-rate(Hz)
|
||||
* ----------------------------------------------------------------------------------
|
||||
* 0 | 0 | 0 | one shot | one shot
|
||||
* 0 | 0 | 1 | 1 | 1
|
||||
* 0 | 1 | 0 | 10 | 10
|
||||
* 0 | 1 | 1 | 25 | 25
|
||||
* 1 | 0 | 0 | 50 | 50
|
||||
* 1 | 0 | 1 | 75 | 75
|
||||
* 1 | 1 | 0 | Reserved | Reserved
|
||||
* 1 | 1 | 1 | Reserved | Reserved
|
||||
*
|
||||
* 3 EN_LPFP: Enable Low Pass filter on Pressure data. Default value:0
|
||||
* 2:LPF_CFG Low-pass configuration register. (0: Filter cutoff is ODR/9; 1: filter cutoff is ODR/20)
|
||||
* 1 BDU: block data update. 0 - continuous update; 1 - output registers not updated until MSB and LSB reading.
|
||||
* 0 SIM: SPI Serial Interface Mode selection. 0 - SPI 4-wire; 1 - SPI 3-wire
|
||||
*/
|
||||
#define LPS22HB_CTRL_REG1 (uint8_t)0x10
|
||||
|
||||
#define LPS22HB_ODR_MASK (uint8_t)0x70
|
||||
#define LPS22HB_LPFP_MASK (uint8_t)0x08
|
||||
#define LPS22HB_LPFP_CUTOFF_MASK (uint8_t)0x04
|
||||
#define LPS22HB_BDU_MASK (uint8_t)0x02
|
||||
#define LPS22HB_SIM_MASK (uint8_t)0x01
|
||||
|
||||
#define LPS22HB_LPFP_BIT LPS22HB_BIT(3)
|
||||
|
||||
/**
|
||||
* @brief Control Register 2
|
||||
* Read/write
|
||||
* Default value: 0x10
|
||||
* 7 BOOT: Reboot memory content. 0: normal mode; 1: reboot memory content. Self-clearing upon completation
|
||||
* 6 FIFO_EN: FIFO Enable. 0: disable; 1: enable
|
||||
* 5 STOP_ON_FTH: Stop on FIFO Threshold FIFO Watermark level use. 0: disable; 1: enable
|
||||
* 4 IF_ADD_INC: Register address automatically incrementeed during a multiple byte access with a serial interface (I2C or SPI).
|
||||
* Default value 1.( 0: disable; 1: enable)
|
||||
* 3 I2C DIS: Disable I2C interface 0: I2C Enabled; 1: I2C disabled
|
||||
* 2 SWRESET: Software reset. 0: normal mode; 1: SW reset. Self-clearing upon completation
|
||||
* 1 AUTO_ZERO: Autozero enable. 0: normal mode; 1: autozero enable.
|
||||
* 0 ONE_SHOT: One shot enable. 0: waiting for start of conversion; 1: start for a new dataset
|
||||
*/
|
||||
#define LPS22HB_CTRL_REG2 (uint8_t)0x11
|
||||
|
||||
#define LPS22HB_BOOT_BIT LPS22HB_BIT(7)
|
||||
#define LPS22HB_FIFO_EN_BIT LPS22HB_BIT(6)
|
||||
#define LPS22HB_WTM_EN_BIT LPS22HB_BIT(5)
|
||||
#define LPS22HB_ADD_INC_BIT LPS22HB_BIT(4)
|
||||
#define LPS22HB_I2C_BIT LPS22HB_BIT(3)
|
||||
#define LPS22HB_SW_RESET_BIT LPS22HB_BIT(2)
|
||||
|
||||
#define LPS22HB_FIFO_EN_MASK (uint8_t)0x40
|
||||
#define LPS22HB_WTM_EN_MASK (uint8_t)0x20
|
||||
#define LPS22HB_ADD_INC_MASK (uint8_t)0x10
|
||||
#define LPS22HB_I2C_MASK (uint8_t)0x08
|
||||
#define LPS22HB_ONE_SHOT_MASK (uint8_t)0x01
|
||||
|
||||
|
||||
/**
|
||||
* @brief CTRL Reg3 Interrupt Control Register
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7 INT_H_L: Interrupt active high, low. 0:active high; 1: active low.
|
||||
* 6 PP_OD: Push-Pull/OpenDrain selection on interrupt pads. 0: Push-pull; 1: open drain.
|
||||
* 5 F_FSS5: FIFO full flag on INT_DRDY pin. Defaul value: 0. (0: Diasable; 1 : Enable).
|
||||
* 4 F_FTH: FIFO threshold (watermark) status on INT_DRDY pin. Defaul value: 0. (0: Diasable; 1 : Enable).
|
||||
* 3 F_OVR: FIFO overrun interrupt on INT_DRDY pin. Defaul value: 0. (0: Diasable; 1 : Enable).
|
||||
* 2 DRDY: Data-ready signal on INT_DRDY pin. Defaul value: 0. (0: Diasable; 1 : Enable).
|
||||
* 1:0 INT_S2, INT_S1: data signal on INT pad control bits.
|
||||
* INT_S2 | INT_S1 | INT pin
|
||||
* ------------------------------------------------------
|
||||
* 0 | 0 | Data signal( in order of priority:PTH_DRDY or F_FTH or F_OVR_or F_FSS5
|
||||
* 0 | 1 | Pressure high (P_high)
|
||||
* 1 | 0 | Pressure low (P_low)
|
||||
* 1 | 1 | P_low OR P_high
|
||||
*/
|
||||
#define LPS22HB_CTRL_REG3 (uint8_t)0x12
|
||||
|
||||
#define LPS22HB_PP_OD_BIT LPS22HB_BIT(6)
|
||||
#define LPS22HB_FIFO_FULL_BIT LPS22HB_BIT(5)
|
||||
#define LPS22HB_FIFO_FTH_BIT LPS22HB_BIT(4)
|
||||
#define LPS22HB_FIFO_OVR_BIT LPS22HB_BIT(3)
|
||||
#define LPS22HB_DRDY_BIT LPS22HB_BIT(2)
|
||||
|
||||
|
||||
#define LPS22HB_INT_H_L_MASK (uint8_t)0x80
|
||||
#define LPS22HB_PP_OD_MASK (uint8_t)0x40
|
||||
#define LPS22HB_FIFO_FULL_MASK (uint8_t)0x20
|
||||
#define LPS22HB_FIFO_FTH_MASK (uint8_t)0x10
|
||||
#define LPS22HB_FIFO_OVR_MASK (uint8_t)0x08
|
||||
#define LPS22HB_DRDY_MASK (uint8_t)0x04
|
||||
#define LPS22HB_INT_S12_MASK (uint8_t)0x03
|
||||
|
||||
|
||||
/**
|
||||
* @brief Interrupt Differential configuration Register
|
||||
* Read/write
|
||||
* Default value: 0x00.
|
||||
* 7 AUTORIFP: AutoRifP Enable
|
||||
* 6 RESET_ARP: Reset AutoRifP function
|
||||
* 4 AUTOZERO: Autozero enabled
|
||||
* 5 RESET_AZ: Reset Autozero Function
|
||||
* 3 DIFF_EN: Interrupt generation enable
|
||||
* 2 LIR: Latch Interrupt request into INT_SOURCE register. 0 - interrupt request not latched
|
||||
* 1 - interrupt request latched
|
||||
* 1 PL_E: Enable interrupt generation on differential pressure low event. 0 - disable; 1 - enable
|
||||
* 0 PH_E: Enable interrupt generation on differential pressure high event. 0 - disable; 1 - enable
|
||||
*/
|
||||
#define LPS22HB_INTERRUPT_CFG_REG (uint8_t)0x0B
|
||||
|
||||
#define LPS22HB_DIFF_EN_BIT LPS22HB_BIT(3)
|
||||
#define LPS22HB_LIR_BIT LPS22HB_BIT(2)
|
||||
#define LPS22HB_PLE_BIT LPS22HB_BIT(1)
|
||||
#define LPS22HB_PHE_BIT LPS22HB_BIT(0)
|
||||
|
||||
#define LPS22HB_AUTORIFP_MASK (uint8_t)0x80
|
||||
#define LPS22HB_RESET_ARP_MASK (uint8_t)0x40
|
||||
#define LPS22HB_AUTOZERO_MASK (uint8_t)0x20
|
||||
#define LPS22HB_RESET_AZ_MASK (uint8_t)0x10
|
||||
#define LPS22HB_DIFF_EN_MASK (uint8_t)0x08
|
||||
#define LPS22HB_LIR_MASK (uint8_t)0x04
|
||||
#define LPS22HB_PLE_MASK (uint8_t)0x02
|
||||
#define LPS22HB_PHE_MASK (uint8_t)0x01
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Interrupt source Register (It is cleared by reading it)
|
||||
* Read
|
||||
* 7 BOOT_STATUS: If 1 indicates that the Boot (Reboot) phase is running.
|
||||
* 6:3 Reserved: Keep these bits at 0
|
||||
* 2 IA: Interrupt Active.0: no interrupt has been generated
|
||||
* 1: one or more interrupt events have been generated.
|
||||
* 1 PL: Differential pressure Low. 0: no interrupt has been generated
|
||||
* 1: Low differential pressure event has occurred.
|
||||
* 0 PH: Differential pressure High. 0: no interrupt has been generated
|
||||
* 1: High differential pressure event has occurred.
|
||||
*/
|
||||
#define LPS22HB_INTERRUPT_SOURCE_REG (uint8_t)0x25
|
||||
|
||||
#define LPS22HB_BOOT_STATUS_BIT LPS22HB_BIT(7)
|
||||
#define LPS22HB_IA_BIT LPS22HB_BIT(2)
|
||||
#define LPS22HB_PL_BIT LPS22HB_BIT(1)
|
||||
#define LPS22HB_PH_BIT LPS22HB_BIT(0)
|
||||
|
||||
#define LPS22HB_BOOT_STATUS_MASK (uint8_t)0x80
|
||||
#define LPS22HB_IA_MASK (uint8_t)0x04
|
||||
#define LPS22HB_PL_MASK (uint8_t)0x02
|
||||
#define LPS22HB_PH_MASK (uint8_t)0x01
|
||||
|
||||
|
||||
/**
|
||||
* @brief Status Register
|
||||
* Read
|
||||
* 7:6 Reserved: 0
|
||||
* 5 T_OR: Temperature data overrun. 0: no overrun has occurred
|
||||
* 1: a new data for temperature has overwritten the previous one.
|
||||
* 4 P_OR: Pressure data overrun. 0: no overrun has occurred
|
||||
* 1: new data for pressure has overwritten the previous one.
|
||||
* 3:2 Reserved: 0
|
||||
* 1 T_DA: Temperature data available. 0: new data for temperature is not yet available
|
||||
* 1: new data for temperature is available.
|
||||
* 0 P_DA: Pressure data available. 0: new data for pressure is not yet available
|
||||
* 1: new data for pressure is available.
|
||||
*/
|
||||
#define LPS22HB_STATUS_REG (uint8_t)0x27
|
||||
|
||||
#define LPS22HB_TOR_BIT LPS22HB_BIT(5)
|
||||
#define LPS22HB_POR_BIT LPS22HB_BIT(4)
|
||||
#define LPS22HB_TDA_BIT LPS22HB_BIT(1)
|
||||
#define LPS22HB_PDA_BIT LPS22HB_BIT(0)
|
||||
|
||||
#define LPS22HB_TOR_MASK (uint8_t)0x20
|
||||
#define LPS22HB_POR_MASK (uint8_t)0x10
|
||||
#define LPS22HB_TDA_MASK (uint8_t)0x02
|
||||
#define LPS22HB_PDA_MASK (uint8_t)0x01
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pressure data (LSB) register.
|
||||
* Read
|
||||
* Default value: 0x00.(To be verified)
|
||||
* POUT7 - POUT0: Pressure data LSB (2's complement).
|
||||
* Pressure output data: Pout(hPA)=(PRESS_OUT_H & PRESS_OUT_L &
|
||||
* PRESS_OUT_XL)[dec]/4096.
|
||||
*/
|
||||
#define LPS22HB_PRESS_OUT_XL_REG (uint8_t)0x28
|
||||
|
||||
/**
|
||||
* @brief Pressure data (Middle part) register.
|
||||
* Read
|
||||
* Default value: 0x80.
|
||||
* POUT15 - POUT8: Pressure data middle part (2's complement).
|
||||
* Pressure output data: Pout(hPA)=(PRESS_OUT_H & PRESS_OUT_L &
|
||||
* PRESS_OUT_XL)[dec]/4096.
|
||||
*/
|
||||
#define LPS22HB_PRESS_OUT_L_REG (uint8_t)0x29
|
||||
|
||||
/**
|
||||
* @brief Pressure data (MSB) register.
|
||||
* Read
|
||||
* Default value: 0x2F.
|
||||
* POUT23 - POUT16: Pressure data MSB (2's complement).
|
||||
* Pressure output data: Pout(hPA)=(PRESS_OUT_H & PRESS_OUT_L &
|
||||
* PRESS_OUT_XL)[dec]/4096.
|
||||
*/
|
||||
#define LPS22HB_PRESS_OUT_H_REG (uint8_t)0x2A
|
||||
|
||||
/**
|
||||
* @brief Temperature data (LSB) register.
|
||||
* Read
|
||||
* Default value: 0x00.
|
||||
* TOUT7 - TOUT0: temperature data LSB.
|
||||
* Tout(degC)=TEMP_OUT/100
|
||||
*/
|
||||
#define LPS22HB_TEMP_OUT_L_REG (uint8_t)0x2B
|
||||
|
||||
/**
|
||||
* @brief Temperature data (MSB) register.
|
||||
* Read
|
||||
* Default value: 0x00.
|
||||
* TOUT15 - TOUT8: temperature data MSB.
|
||||
* Tout(degC)=TEMP_OUT/100
|
||||
*/
|
||||
#define LPS22HBH_TEMP_OUT_H_REG (uint8_t)0x2C
|
||||
|
||||
/**
|
||||
* @brief Threshold pressure (LSB) register.
|
||||
* Read/write
|
||||
* Default value: 0x00.
|
||||
* 7:0 THS7-THS0: LSB Threshold pressure Low part of threshold value for pressure interrupt
|
||||
* generation. The complete threshold value is given by THS_P_H & THS_P_L and is
|
||||
* expressed as unsigned number. P_ths(hPA)=(THS_P_H & THS_P_L)[dec]/16.
|
||||
*/
|
||||
#define LPS22HB_THS_P_LOW_REG (uint8_t)0x0C
|
||||
|
||||
/**
|
||||
* @brief Threshold pressure (MSB)
|
||||
* Read/write
|
||||
* Default value: 0x00.
|
||||
* 7:0 THS15-THS8: MSB Threshold pressure. High part of threshold value for pressure interrupt
|
||||
* generation. The complete threshold value is given by THS_P_H & THS_P_L and is
|
||||
* expressed as unsigned number. P_ths(mbar)=(THS_P_H & THS_P_L)[dec]/16.
|
||||
*/
|
||||
#define LPS22HB_THS_P_HIGH_REG (uint8_t)0x0D
|
||||
|
||||
/**
|
||||
* @brief FIFO control register
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7:5 F_MODE2, F_MODE1, F_MODE0: FIFO mode selection.
|
||||
* FM2 | FM1 | FM0 | FIFO MODE
|
||||
* ---------------------------------------------------
|
||||
* 0 | 0 | 0 | BYPASS MODE
|
||||
* 0 | 0 | 1 | FIFO MODE. Stops collecting data when full
|
||||
* 0 | 1 | 0 | STREAM MODE: Keep the newest measurements in the FIFO
|
||||
* 0 | 1 | 1 | STREAM MODE until trigger deasserted, then change to FIFO MODE
|
||||
* 1 | 0 | 0 | BYPASS MODE until trigger deasserted, then STREAM MODE
|
||||
* 1 | 0 | 1 | Reserved for future use
|
||||
* 1 | 1 | 0 | Reserved
|
||||
* 1 | 1 | 1 | BYPASS mode until trigger deasserted, then FIFO MODE
|
||||
*
|
||||
* 4:0 WTM_POINT4-0 : FIFO Watermark level selection (0-31)
|
||||
*/
|
||||
#define LPS22HB_CTRL_FIFO_REG (uint8_t)0x14
|
||||
|
||||
#define LPS22HB_FIFO_MODE_MASK (uint8_t)0xE0
|
||||
#define LPS22HB_WTM_POINT_MASK (uint8_t)0x1F
|
||||
|
||||
|
||||
/**
|
||||
* @brief FIFO Status register
|
||||
* Read
|
||||
* 7 FTH_FIFO: FIFO threshold status. 0:FIFO filling is lower than FTH level
|
||||
* 1: FIFO is equal or higher than FTH level.
|
||||
* 6 OVR: Overrun bit status. 0 - FIFO not full
|
||||
* 1 - FIFO is full and at least one sample in the FIFO has been overwritten.
|
||||
* 5:0 FSS: FIFO Stored data level. 000000: FIFO empty, 100000: FIFO is full and has 32 unread samples.
|
||||
*/
|
||||
#define LPS22HB_STATUS_FIFO_REG (uint8_t)0x26
|
||||
|
||||
#define LPS22HB_FTH_FIFO_BIT LPS22HB_BIT(7)
|
||||
#define LPS22HB_OVR_FIFO_BIT LPS22HB_BIT(6)
|
||||
|
||||
#define LPS22HB_FTH_FIFO_MASK (uint8_t)0x80
|
||||
#define LPS22HB_OVR_FIFO_MASK (uint8_t)0x40
|
||||
#define LPS22HB_LEVEL_FIFO_MASK (uint8_t)0x3F
|
||||
#define LPS22HB_FIFO_EMPTY (uint8_t)0x00
|
||||
#define LPS22HB_FIFO_FULL (uint8_t)0x20
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pressure offset register (LSB)
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7:0 RPDS7-0:Pressure Offset for 1 point calibration (OPC) after soldering.
|
||||
* This register contains the low part of the pressure offset value after soldering,for
|
||||
* differential pressure computing. The complete value is given by RPDS_L & RPDS_H
|
||||
* and is expressed as signed 2 complement value.
|
||||
*/
|
||||
#define LPS22HB_RPDS_L_REG (uint8_t)0x18
|
||||
|
||||
/**
|
||||
* @brief Pressure offset register (MSB)
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7:0 RPDS15-8:Pressure Offset for 1 point calibration (OPC) after soldering.
|
||||
* This register contains the high part of the pressure offset value after soldering (see description RPDS_L)
|
||||
*/
|
||||
#define LPS22HB_RPDS_H_REG (uint8_t)0x19
|
||||
|
||||
|
||||
/**
|
||||
* @brief Clock Tree Configuration register
|
||||
* Read/write
|
||||
* Default value: 0x00
|
||||
* 7:6 Reserved.
|
||||
* 5: CTE: Clock Tree Enhancement
|
||||
*/
|
||||
#define LPS22HB_CLOCK_TREE_CONFIGURATION (uint8_t)0x43
|
||||
#define LPS22HB_CTE_MASK (uint8_t)0x20
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/** @defgroup LPS22HB_Pressure_Exported_Functions LPS22HB Pressure Exported Functions
|
||||
* @{
|
||||
*/
|
||||
/* PRESSURE functions */
|
||||
void LPS22HB_P_Init(uint16_t DeviceAddr);
|
||||
uint8_t LPS22HB_P_ReadID(uint16_t DeviceAddr);
|
||||
float LPS22HB_P_ReadPressure(uint16_t DeviceAddr);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup HTS221_PressImported_Globals PRESSURE Imported Globals
|
||||
* @{
|
||||
*/
|
||||
/* PRESSURE driver structure */
|
||||
extern PSENSOR_DrvTypeDef LPS22HB_P_Drv;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup LPS22HB_Temperature_Exported_Functions LPS22HB Temperature Exported Functions
|
||||
* @{
|
||||
*/
|
||||
/* TEMPERATURE functions */
|
||||
void LPS22HB_T_Init(uint16_t DeviceAddr, TSENSOR_InitTypeDef *pInitStruct);
|
||||
float LPS22HB_T_ReadTemp(uint16_t DeviceAddr);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup HTS221_TempImported_Globals Temperature Imported Globals
|
||||
* @{
|
||||
*/
|
||||
/* Temperature driver structure */
|
||||
extern TSENSOR_DrvTypeDef LPS22HB_T_Drv;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup LPS22HB_Imported_Functions LPS22HB Imported Functions
|
||||
* @{
|
||||
*/
|
||||
/* IO functions */
|
||||
extern void SENSOR_IO_Init(void);
|
||||
extern void SENSOR_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value);
|
||||
extern uint8_t SENSOR_IO_Read(uint8_t Addr, uint8_t Reg);
|
||||
extern uint16_t SENSOR_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length);
|
||||
extern void SENSOR_IO_WriteMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LPS22HB__H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
@ -1,83 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* @file psensor.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the functions prototypes for the
|
||||
* Pressure Sensor driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <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
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __PSENSOR_H
|
||||
#define __PSENSOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup PSENSOR
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup PSENSOR_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup PSENSOR_Driver_structure Pressure Sensor Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
void (*Init)(uint16_t);
|
||||
uint8_t (*ReadID)(uint16_t);
|
||||
float (*ReadPressure)(uint16_t);
|
||||
}PSENSOR_DrvTypeDef;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PSENSOR_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
@ -53,7 +53,7 @@ void PendSV_Handler(void);
|
|||
void SysTick_Handler(void);
|
||||
void DMA1_Channel2_3_IRQHandler(void);
|
||||
void TIM21_IRQHandler(void);
|
||||
void USART1_IRQHandler(void);
|
||||
void LPUART1_IRQHandler(void);
|
||||
/* USER CODE BEGIN EFP */
|
||||
|
||||
/* USER CODE END EFP */
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* @file tsensor.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the functions prototypes for the
|
||||
* Temperature Sensor driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <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
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __TSENSOR_H
|
||||
#define __TSENSOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup TSENSOR
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup TSENSOR_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup TSENSOR_Config_structure Temperature Sensor Configuration structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint8_t AlertMode; /* Alert Mode Temperature out of range*/
|
||||
uint8_t ConversionMode; /* Continuous/One Shot Mode */
|
||||
uint8_t ConversionResolution; /* Temperature Resolution */
|
||||
uint8_t ConversionRate; /* Number of measure per second */
|
||||
int8_t TemperatureLimitHigh; /* High Temperature Limit Range */
|
||||
int8_t TemperatureLimitLow; /* Low Temperature Limit Range */
|
||||
}TSENSOR_InitTypeDef;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup TSENSOR_Driver_structure Temperature Sensor Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
void (*Init)(uint16_t, TSENSOR_InitTypeDef *);
|
||||
uint8_t (*IsReady)(uint16_t, uint32_t);
|
||||
uint8_t (*ReadStatus)(uint16_t);
|
||||
float (*ReadTemp)(uint16_t);
|
||||
}TSENSOR_DrvTypeDef;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __TSENSOR_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* gps.c
|
||||
*
|
||||
* Created on: Mar 19, 2024
|
||||
* Author: pawel
|
||||
*/
|
||||
|
||||
#include "gps.h"
|
||||
#include "main.h"
|
||||
|
||||
|
|
@ -1,232 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* @file lps22hb.c
|
||||
* @author MCD Application Team
|
||||
* @brief This file provides a set of functions needed to manage the LPS22HB
|
||||
* pressure and temperature devices
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <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
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "lps22hb.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Component
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup LPS22HB LPS22HB
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup LPS22HB_Private_FunctionsPrototypes LPS22HB Private Functions Prototypes
|
||||
* @{
|
||||
*/
|
||||
static void LPS22HB_Init(uint16_t DeviceAddr);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup LPS22HB_Private_Variables LPS22HB Private Variables
|
||||
* @{
|
||||
*/
|
||||
/* Pressure Private Variables */
|
||||
PSENSOR_DrvTypeDef LPS22HB_P_Drv =
|
||||
{
|
||||
LPS22HB_P_Init,
|
||||
LPS22HB_P_ReadID,
|
||||
LPS22HB_P_ReadPressure
|
||||
};
|
||||
|
||||
/* Temperature Private Variables */
|
||||
TSENSOR_DrvTypeDef LPS22HB_T_Drv =
|
||||
{
|
||||
LPS22HB_T_Init,
|
||||
0,
|
||||
0,
|
||||
LPS22HB_T_ReadTemp
|
||||
};
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup LPS22HB_Pressure_Private_Functions LPS22HB Pressure Private Functions
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief Set LPS22HB pressure sensor Initialization.
|
||||
*/
|
||||
void LPS22HB_P_Init(uint16_t DeviceAddr)
|
||||
{
|
||||
LPS22HB_Init(DeviceAddr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Read LPS22HB ID.
|
||||
* @retval ID
|
||||
*/
|
||||
uint8_t LPS22HB_P_ReadID(uint16_t DeviceAddr)
|
||||
{
|
||||
uint8_t ctrl = 0x00;
|
||||
|
||||
/* IO interface initialization */
|
||||
SENSOR_IO_Init();
|
||||
|
||||
/* Read value at Who am I register address */
|
||||
ctrl = SENSOR_IO_Read(DeviceAddr, LPS22HB_WHO_AM_I_REG);
|
||||
|
||||
return ctrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Read pressure value of LPS22HB
|
||||
* @retval pressure value
|
||||
*/
|
||||
float LPS22HB_P_ReadPressure(uint16_t DeviceAddr)
|
||||
{
|
||||
int32_t raw_press;
|
||||
uint8_t buffer[3];
|
||||
uint32_t tmp = 0;
|
||||
uint8_t i;
|
||||
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
buffer[i] = SENSOR_IO_Read(DeviceAddr, (LPS22HB_PRESS_OUT_XL_REG + i));
|
||||
}
|
||||
|
||||
/* Build the raw data */
|
||||
for(i = 0; i < 3; i++)
|
||||
tmp |= (((uint32_t)buffer[i]) << (8 * i));
|
||||
|
||||
/* convert the 2's complement 24 bit to 2's complement 32 bit */
|
||||
if(tmp & 0x00800000)
|
||||
tmp |= 0xFF000000;
|
||||
|
||||
raw_press = ((int32_t)tmp);
|
||||
|
||||
raw_press = (raw_press * 100) / 4096;
|
||||
|
||||
return (float)((float)raw_press / 100.0f);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup LPS22HB_Temperature_Private_Functions LPS22HB Temperature Private Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Set LPS22HB temperature sensor Initialization.
|
||||
* @param DeviceAddr: I2C device address
|
||||
* @param InitStruct: pointer to a TSENSOR_InitTypeDef structure
|
||||
* that contains the configuration setting for the HTS221.
|
||||
* @retval None
|
||||
*/
|
||||
void LPS22HB_T_Init(uint16_t DeviceAddr, TSENSOR_InitTypeDef *pInitStruct)
|
||||
{
|
||||
LPS22HB_Init(DeviceAddr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Read temperature value of LPS22HB
|
||||
* @param DeviceAddr: I2C device address
|
||||
* @retval temperature value
|
||||
*/
|
||||
float LPS22HB_T_ReadTemp(uint16_t DeviceAddr)
|
||||
{
|
||||
int16_t raw_data;
|
||||
uint8_t buffer[2];
|
||||
uint16_t tmp;
|
||||
uint8_t i;
|
||||
|
||||
for(i = 0; i < 2; i++)
|
||||
{
|
||||
buffer[i] = SENSOR_IO_Read(DeviceAddr, (LPS22HB_TEMP_OUT_L_REG + i));
|
||||
}
|
||||
|
||||
/* Build the raw tmp */
|
||||
tmp = (((uint16_t)buffer[1]) << 8) + (uint16_t)buffer[0];
|
||||
|
||||
raw_data = (tmp * 10) / 100;
|
||||
|
||||
return ((float)(raw_data / 10.0f));
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup LPS22HB_Private_Functions LPS22HB Private functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Set LPS22HB Initialization.
|
||||
* @param DeviceAddr: I2C device address
|
||||
* @retval None
|
||||
*/
|
||||
static void LPS22HB_Init(uint16_t DeviceAddr)
|
||||
{
|
||||
uint8_t tmp;
|
||||
|
||||
/* Set Power mode */
|
||||
tmp = SENSOR_IO_Read(DeviceAddr, LPS22HB_RES_CONF_REG);
|
||||
|
||||
tmp &= ~LPS22HB_LCEN_MASK;
|
||||
tmp |= (uint8_t)0x01; /* Set low current mode */
|
||||
|
||||
SENSOR_IO_Write(DeviceAddr, LPS22HB_RES_CONF_REG, tmp);
|
||||
|
||||
/* Read CTRL_REG1 */
|
||||
tmp = SENSOR_IO_Read(DeviceAddr, LPS22HB_CTRL_REG1);
|
||||
|
||||
/* Set default ODR */
|
||||
tmp &= ~LPS22HB_ODR_MASK;
|
||||
tmp |= (uint8_t)0x30; /* Set ODR to 25Hz */
|
||||
|
||||
/* Enable BDU */
|
||||
tmp &= ~LPS22HB_BDU_MASK;
|
||||
tmp |= ((uint8_t)0x02);
|
||||
|
||||
/* Apply settings to CTRL_REG1 */
|
||||
SENSOR_IO_Write(DeviceAddr, LPS22HB_CTRL_REG1, tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|
@ -22,9 +22,8 @@
|
|||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include "adf7012.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
|
@ -56,6 +55,7 @@ TIM_HandleTypeDef htim21;
|
|||
|
||||
|
||||
|
||||
|
||||
/* USER CODE END PV */
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
|
@ -73,6 +73,8 @@ static void MX_TIM21_Init(void);
|
|||
|
||||
/* Private user code ---------------------------------------------------------*/
|
||||
/* USER CODE BEGIN 0 */
|
||||
uint8_t onebyte[1];
|
||||
uint8_t rec = 0;
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
|
@ -83,12 +85,17 @@ static void MX_TIM21_Init(void);
|
|||
int main(void)
|
||||
{
|
||||
/* USER CODE BEGIN 1 */
|
||||
int count = 0;
|
||||
int countb = 0;
|
||||
uint8_t onebyte[1];
|
||||
uint8_t header[4] = {170, 170, 170, 3};
|
||||
uint8_t data[58];
|
||||
bool dt = false;
|
||||
int32_t preambule;
|
||||
uint8_t data[58];
|
||||
uint8_t buffer[20];
|
||||
uint8_t dt = 0;
|
||||
uint8_t count = 0;
|
||||
uint8_t satcount = 0;
|
||||
|
||||
//uint8_t data[50];
|
||||
//uint16_t size = 0;
|
||||
|
||||
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/* MCU Configuration--------------------------------------------------------*/
|
||||
|
@ -120,69 +127,96 @@ int main(void)
|
|||
HAL_GPIO_WritePin(DC_boost_GPIO_Port, DC_boost_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(200);
|
||||
//HAL_GPIO_WritePin(Battery_on_GPIO_Port, Battery_on_Pin, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(RADIO_EN_GPIO_Port, RADIO_EN_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPS_ON_GPIO_Port, GPS_ON_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(200);
|
||||
|
||||
//activeMode++;
|
||||
// HAL_GPIO_WritePin(RADIO_EN_GPIO_Port, RADIO_EN_Pin, GPIO_PIN_RESET);
|
||||
|
||||
myspi(0b00000000000000000010000000100010);
|
||||
myspi(0b00000000011101000001100010101111);
|
||||
myspi(0b00000011110001000010000001001100);
|
||||
myspi(0b00000000000011011111000011001101);
|
||||
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_UART_Transmit_IT(&huart1, "START\n", 6);
|
||||
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
HAL_Delay(200);
|
||||
|
||||
HAL_GPIO_WritePin(GPS_ON_GPIO_Port, GPS_ON_Pin, GPIO_PIN_SET);
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)&"START\r\n", 7, 10);
|
||||
HAL_Delay(500);
|
||||
|
||||
HAL_UART_Receive_IT(&huart1, onebyte, 1);
|
||||
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
/* USER CODE BEGIN WHILE */
|
||||
while (1){
|
||||
/* USER CODE END WHILE */
|
||||
while (1)
|
||||
{
|
||||
/* USER CODE END WHILE */
|
||||
|
||||
/* USER CODE BEGIN 3 */
|
||||
if(HAL_OK == HAL_UART_Receive(&hlpuart1,onebyte,1,10)){
|
||||
/* USER CODE BEGIN 3 */
|
||||
HAL_Delay(500);
|
||||
|
||||
HAL_GPIO_TogglePin (LED_GPIO_Port, LED_Pin);
|
||||
if(dt){
|
||||
if(countb < 58){
|
||||
data[countb]=onebyte[0];
|
||||
countb++;
|
||||
}else{
|
||||
countb=0;
|
||||
HAL_UART_Transmit(&huart1, "!!!!", 4,10);
|
||||
HAL_UART_Transmit(&huart1, data, 58,10);
|
||||
dt = false;
|
||||
}
|
||||
}else{
|
||||
if(onebyte[0] == header[count]){
|
||||
if(count == 3){
|
||||
dt = true;
|
||||
count = 0;
|
||||
}else{
|
||||
count++;
|
||||
}
|
||||
}else{
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
//HAL_UART_Transmit(&huart1, onebyte, 1,10);
|
||||
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
||||
}
|
||||
}
|
||||
/* USER CODE END 3 */
|
||||
if(rec == 1)
|
||||
{
|
||||
HAL_GPIO_TogglePin (LED_GPIO_Port, LED_Pin);
|
||||
rec = 0;
|
||||
if (dt==1) {
|
||||
if (count < 58){
|
||||
data[count] = onebyte[0];
|
||||
count++;
|
||||
}
|
||||
if (count > 57) {
|
||||
dt = 0;
|
||||
int32_t lat = data[1] << 24 | data[2] << 16 | data[3] << 8 | data[4];
|
||||
int32_t lon = data[5] << 24 | data[6] << 16 | data[7] << 8 | data[8];
|
||||
int32_t alt = data[9] << 16 | data[10] << 8 | data[11];
|
||||
int32_t gps_time = data[18] << 16 | data[19] << 8 | data[20];
|
||||
HAL_GPIO_TogglePin (LED_GPIO_Port, LED_Pin);
|
||||
|
||||
sprintf(buffer, "Lat %d ", lat);
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)&buffer, strlen(buffer),10);
|
||||
sprintf(buffer, "Long %d ", lon);
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)&buffer, strlen(buffer),10);
|
||||
sprintf(buffer, "Alt %d ", alt);
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)&buffer, strlen(buffer),10);
|
||||
sprintf(buffer, "Time %d ", gps_time);
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)&buffer, strlen(buffer),10);
|
||||
sprintf(buffer, "Fix %d ", data[0]);
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)&buffer, strlen(buffer),10);
|
||||
satcount=0;
|
||||
for(uint8_t i = 0; i<12; i++){
|
||||
if(data[24+i]>0){
|
||||
satcount++;
|
||||
}
|
||||
}
|
||||
sprintf(buffer, "Sat %d ", satcount);
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)&buffer, strlen(buffer),10);
|
||||
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)&"\r\n", 2,10);
|
||||
|
||||
HAL_GPIO_TogglePin (LED_GPIO_Port, LED_Pin);
|
||||
}
|
||||
}
|
||||
|
||||
preambule = (preambule << 8) | onebyte[0];
|
||||
|
||||
if (preambule == 0xAAAAAA03){
|
||||
// HAL_UART_Transmit(&huart1, "!!!", 3,10);
|
||||
dt = 1;
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* USER CODE END 3 */
|
||||
}
|
||||
|
||||
|
@ -573,7 +607,11 @@ static void MX_GPIO_Init(void)
|
|||
}
|
||||
|
||||
/* USER CODE BEGIN 4 */
|
||||
|
||||
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *hlpuart)
|
||||
{
|
||||
HAL_UART_Receive_IT(&hlpuart1, onebyte, 1);
|
||||
rec = 1;
|
||||
}
|
||||
/* USER CODE END 4 */
|
||||
|
||||
/**
|
||||
|
|
|
@ -180,6 +180,9 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
|
|||
GPIO_InitStruct.Alternate = GPIO_AF0_LPUART1;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/* LPUART1 interrupt Init */
|
||||
HAL_NVIC_SetPriority(LPUART1_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(LPUART1_IRQn);
|
||||
/* USER CODE BEGIN LPUART1_MspInit 1 */
|
||||
|
||||
/* USER CODE END LPUART1_MspInit 1 */
|
||||
|
@ -222,9 +225,6 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
|
|||
|
||||
__HAL_LINKDMA(huart,hdmarx,hdma_usart1_rx);
|
||||
|
||||
/* USART1 interrupt Init */
|
||||
HAL_NVIC_SetPriority(USART1_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(USART1_IRQn);
|
||||
/* USER CODE BEGIN USART1_MspInit 1 */
|
||||
|
||||
/* USER CODE END USART1_MspInit 1 */
|
||||
|
@ -254,6 +254,8 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
|||
*/
|
||||
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_10|GPIO_PIN_11);
|
||||
|
||||
/* LPUART1 interrupt DeInit */
|
||||
HAL_NVIC_DisableIRQ(LPUART1_IRQn);
|
||||
/* USER CODE BEGIN LPUART1_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END LPUART1_MspDeInit 1 */
|
||||
|
@ -274,9 +276,6 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
|||
|
||||
/* USART1 DMA DeInit */
|
||||
HAL_DMA_DeInit(huart->hdmarx);
|
||||
|
||||
/* USART1 interrupt DeInit */
|
||||
HAL_NVIC_DisableIRQ(USART1_IRQn);
|
||||
/* USER CODE BEGIN USART1_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END USART1_MspDeInit 1 */
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
/* External variables --------------------------------------------------------*/
|
||||
extern DMA_HandleTypeDef hdma_usart1_rx;
|
||||
extern UART_HandleTypeDef huart1;
|
||||
extern UART_HandleTypeDef hlpuart1;
|
||||
extern TIM_HandleTypeDef htim21;
|
||||
/* USER CODE BEGIN EV */
|
||||
|
||||
|
@ -172,17 +172,17 @@ void TIM21_IRQHandler(void)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles USART1 global interrupt / USART1 wake-up interrupt through EXTI line 25.
|
||||
* @brief This function handles LPUART1 global interrupt / LPUART1 wake-up interrupt through EXTI line 28.
|
||||
*/
|
||||
void USART1_IRQHandler(void)
|
||||
void LPUART1_IRQHandler(void)
|
||||
{
|
||||
/* USER CODE BEGIN USART1_IRQn 0 */
|
||||
/* USER CODE BEGIN LPUART1_IRQn 0 */
|
||||
|
||||
/* USER CODE END USART1_IRQn 0 */
|
||||
HAL_UART_IRQHandler(&huart1);
|
||||
/* USER CODE BEGIN USART1_IRQn 1 */
|
||||
/* USER CODE END LPUART1_IRQn 0 */
|
||||
HAL_UART_IRQHandler(&hlpuart1);
|
||||
/* USER CODE BEGIN LPUART1_IRQn 1 */
|
||||
|
||||
/* USER CODE END USART1_IRQn 1 */
|
||||
/* USER CODE END LPUART1_IRQn 1 */
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
Core/Src/gps.o: ../Core/Src/gps.c ../Core/Inc/gps.h ../Core/Inc/main.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h \
|
||||
../Core/Inc/stm32l0xx_hal_conf.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rcc.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_def.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l0xx.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l051xx.h \
|
||||
../Drivers/CMSIS/Include/core_cm0plus.h \
|
||||
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||
../Drivers/CMSIS/Include/mpu_armv7.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32L0xx/Include/system_stm32l0xx.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rcc_ex.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_exti.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_gpio.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_gpio_ex.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_dma.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_cortex.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_adc.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_adc_ex.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash_ex.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash_ramfunc.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2c.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2c_ex.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pwr.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pwr_ex.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_spi.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_tim.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_tim_ex.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_uart.h \
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_uart_ex.h \
|
||||
../Core/Inc/main.h
|
||||
../Core/Inc/gps.h:
|
||||
../Core/Inc/main.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h:
|
||||
../Core/Inc/stm32l0xx_hal_conf.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rcc.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_def.h:
|
||||
../Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l0xx.h:
|
||||
../Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l051xx.h:
|
||||
../Drivers/CMSIS/Include/core_cm0plus.h:
|
||||
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||
../Drivers/CMSIS/Include/mpu_armv7.h:
|
||||
../Drivers/CMSIS/Device/ST/STM32L0xx/Include/system_stm32l0xx.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rcc_ex.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_exti.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_gpio.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_gpio_ex.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_dma.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_cortex.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_adc.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_adc_ex.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash_ex.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash_ramfunc.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2c.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2c_ex.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pwr.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pwr_ex.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_spi.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_tim.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_tim_ex.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_uart.h:
|
||||
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_uart_ex.h:
|
||||
../Core/Inc/main.h:
|
Plik binarny nie jest wyświetlany.
|
@ -1,6 +0,0 @@
|
|||
../Core/Src/lps22hb.c:77:6:LPS22HB_P_Init 1
|
||||
../Core/Src/lps22hb.c:86:9:LPS22HB_P_ReadID 1
|
||||
../Core/Src/lps22hb.c:103:7:LPS22HB_P_ReadPressure 5
|
||||
../Core/Src/lps22hb.c:146:6:LPS22HB_T_Init 1
|
||||
../Core/Src/lps22hb.c:156:7:LPS22HB_T_ReadTemp 2
|
||||
../Core/Src/lps22hb.c:189:13:LPS22HB_Init 1
|
|
@ -1,5 +0,0 @@
|
|||
Core/Src/lps22hb.o: ../Core/Src/lps22hb.c ../Core/Inc/lps22hb.h \
|
||||
../Core/Inc/psensor.h ../Core/Inc/tsensor.h
|
||||
../Core/Inc/lps22hb.h:
|
||||
../Core/Inc/psensor.h:
|
||||
../Core/Inc/tsensor.h:
|
Plik binarny nie jest wyświetlany.
|
@ -1,6 +0,0 @@
|
|||
../Core/Src/lps22hb.c:77:6:LPS22HB_P_Init 16 static
|
||||
../Core/Src/lps22hb.c:86:9:LPS22HB_P_ReadID 32 static
|
||||
../Core/Src/lps22hb.c:103:7:LPS22HB_P_ReadPressure 40 static
|
||||
../Core/Src/lps22hb.c:146:6:LPS22HB_T_Init 16 static
|
||||
../Core/Src/lps22hb.c:156:7:LPS22HB_T_ReadTemp 32 static
|
||||
../Core/Src/lps22hb.c:189:13:LPS22HB_Init 32 static
|
|
@ -1,10 +1,11 @@
|
|||
../Core/Src/main.c:83:5:main 6
|
||||
../Core/Src/main.c:193:6:SystemClock_Config 4
|
||||
../Core/Src/main.c:249:13:MX_ADC_Init 5
|
||||
../Core/Src/main.c:321:13:MX_LPUART1_UART_Init 2
|
||||
../Core/Src/main.c:355:13:MX_USART1_UART_Init 2
|
||||
../Core/Src/main.c:390:13:MX_SPI1_Init 2
|
||||
../Core/Src/main.c:428:13:MX_TIM21_Init 4
|
||||
../Core/Src/main.c:471:13:MX_DMA_Init 1
|
||||
../Core/Src/main.c:489:13:MX_GPIO_Init 1
|
||||
../Core/Src/main.c:583:6:Error_Handler 1
|
||||
../Core/Src/main.c:85:5:main 8
|
||||
../Core/Src/main.c:227:6:SystemClock_Config 4
|
||||
../Core/Src/main.c:283:13:MX_ADC_Init 5
|
||||
../Core/Src/main.c:355:13:MX_LPUART1_UART_Init 2
|
||||
../Core/Src/main.c:389:13:MX_USART1_UART_Init 2
|
||||
../Core/Src/main.c:424:13:MX_SPI1_Init 2
|
||||
../Core/Src/main.c:462:13:MX_TIM21_Init 4
|
||||
../Core/Src/main.c:505:13:MX_DMA_Init 1
|
||||
../Core/Src/main.c:523:13:MX_GPIO_Init 1
|
||||
../Core/Src/main.c:610:6:HAL_UART_RxCpltCallback 1
|
||||
../Core/Src/main.c:621:6:Error_Handler 1
|
||||
|
|
Plik binarny nie jest wyświetlany.
|
@ -1,10 +1,11 @@
|
|||
../Core/Src/main.c:83:5:main 96 static
|
||||
../Core/Src/main.c:193:6:SystemClock_Config 120 static
|
||||
../Core/Src/main.c:249:13:MX_ADC_Init 16 static
|
||||
../Core/Src/main.c:321:13:MX_LPUART1_UART_Init 8 static
|
||||
../Core/Src/main.c:355:13:MX_USART1_UART_Init 8 static
|
||||
../Core/Src/main.c:390:13:MX_SPI1_Init 8 static
|
||||
../Core/Src/main.c:428:13:MX_TIM21_Init 32 static
|
||||
../Core/Src/main.c:471:13:MX_DMA_Init 16 static
|
||||
../Core/Src/main.c:489:13:MX_GPIO_Init 56 static
|
||||
../Core/Src/main.c:583:6:Error_Handler 8 static,ignoring_inline_asm
|
||||
../Core/Src/main.c:85:5:main 120 static
|
||||
../Core/Src/main.c:227:6:SystemClock_Config 120 static
|
||||
../Core/Src/main.c:283:13:MX_ADC_Init 16 static
|
||||
../Core/Src/main.c:355:13:MX_LPUART1_UART_Init 8 static
|
||||
../Core/Src/main.c:389:13:MX_USART1_UART_Init 8 static
|
||||
../Core/Src/main.c:424:13:MX_SPI1_Init 8 static
|
||||
../Core/Src/main.c:462:13:MX_TIM21_Init 32 static
|
||||
../Core/Src/main.c:505:13:MX_DMA_Init 16 static
|
||||
../Core/Src/main.c:523:13:MX_GPIO_Init 56 static
|
||||
../Core/Src/main.c:610:6:HAL_UART_RxCpltCallback 16 static
|
||||
../Core/Src/main.c:621:6:Error_Handler 8 static,ignoring_inline_asm
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
../Core/Src/stm32l0xx_hal_msp.c:128:6:HAL_ADC_MspDeInit 2
|
||||
../Core/Src/stm32l0xx_hal_msp.c:160:6:HAL_UART_MspInit 4
|
||||
../Core/Src/stm32l0xx_hal_msp.c:241:6:HAL_UART_MspDeInit 3
|
||||
../Core/Src/stm32l0xx_hal_msp.c:293:6:HAL_SPI_MspInit 2
|
||||
../Core/Src/stm32l0xx_hal_msp.c:331:6:HAL_SPI_MspDeInit 2
|
||||
../Core/Src/stm32l0xx_hal_msp.c:362:6:HAL_TIM_Base_MspInit 2
|
||||
../Core/Src/stm32l0xx_hal_msp.c:387:6:HAL_TIM_Base_MspDeInit 2
|
||||
../Core/Src/stm32l0xx_hal_msp.c:292:6:HAL_SPI_MspInit 2
|
||||
../Core/Src/stm32l0xx_hal_msp.c:330:6:HAL_SPI_MspDeInit 2
|
||||
../Core/Src/stm32l0xx_hal_msp.c:361:6:HAL_TIM_Base_MspInit 2
|
||||
../Core/Src/stm32l0xx_hal_msp.c:386:6:HAL_TIM_Base_MspDeInit 2
|
||||
|
|
Plik binarny nie jest wyświetlany.
|
@ -3,7 +3,7 @@
|
|||
../Core/Src/stm32l0xx_hal_msp.c:128:6:HAL_ADC_MspDeInit 16 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:160:6:HAL_UART_MspInit 56 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:241:6:HAL_UART_MspDeInit 16 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:293:6:HAL_SPI_MspInit 48 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:331:6:HAL_SPI_MspDeInit 16 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:362:6:HAL_TIM_Base_MspInit 16 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:387:6:HAL_TIM_Base_MspDeInit 16 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:292:6:HAL_SPI_MspInit 48 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:330:6:HAL_SPI_MspDeInit 16 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:361:6:HAL_TIM_Base_MspInit 16 static
|
||||
../Core/Src/stm32l0xx_hal_msp.c:386:6:HAL_TIM_Base_MspDeInit 16 static
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
../Core/Src/stm32l0xx_it.c:128:6:SysTick_Handler 1
|
||||
../Core/Src/stm32l0xx_it.c:149:6:DMA1_Channel2_3_IRQHandler 1
|
||||
../Core/Src/stm32l0xx_it.c:163:6:TIM21_IRQHandler 1
|
||||
../Core/Src/stm32l0xx_it.c:177:6:USART1_IRQHandler 1
|
||||
../Core/Src/stm32l0xx_it.c:177:6:LPUART1_IRQHandler 1
|
||||
|
|
Plik binarny nie jest wyświetlany.
|
@ -5,4 +5,4 @@
|
|||
../Core/Src/stm32l0xx_it.c:128:6:SysTick_Handler 8 static
|
||||
../Core/Src/stm32l0xx_it.c:149:6:DMA1_Channel2_3_IRQHandler 8 static
|
||||
../Core/Src/stm32l0xx_it.c:163:6:TIM21_IRQHandler 8 static
|
||||
../Core/Src/stm32l0xx_it.c:177:6:USART1_IRQHandler 8 static
|
||||
../Core/Src/stm32l0xx_it.c:177:6:LPUART1_IRQHandler 8 static
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../Core/Src/adf7012.c \
|
||||
../Core/Src/lps22hb.c \
|
||||
../Core/Src/gps.c \
|
||||
../Core/Src/main.c \
|
||||
../Core/Src/stm32l0xx_hal_msp.c \
|
||||
../Core/Src/stm32l0xx_it.c \
|
||||
|
@ -16,7 +16,7 @@ C_SRCS += \
|
|||
|
||||
C_DEPS += \
|
||||
./Core/Src/adf7012.d \
|
||||
./Core/Src/lps22hb.d \
|
||||
./Core/Src/gps.d \
|
||||
./Core/Src/main.d \
|
||||
./Core/Src/stm32l0xx_hal_msp.d \
|
||||
./Core/Src/stm32l0xx_it.d \
|
||||
|
@ -26,7 +26,7 @@ C_DEPS += \
|
|||
|
||||
OBJS += \
|
||||
./Core/Src/adf7012.o \
|
||||
./Core/Src/lps22hb.o \
|
||||
./Core/Src/gps.o \
|
||||
./Core/Src/main.o \
|
||||
./Core/Src/stm32l0xx_hal_msp.o \
|
||||
./Core/Src/stm32l0xx_it.o \
|
||||
|
@ -42,7 +42,7 @@ Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk
|
|||
clean: clean-Core-2f-Src
|
||||
|
||||
clean-Core-2f-Src:
|
||||
-$(RM) ./Core/Src/adf7012.cyclo ./Core/Src/adf7012.d ./Core/Src/adf7012.o ./Core/Src/adf7012.su ./Core/Src/lps22hb.cyclo ./Core/Src/lps22hb.d ./Core/Src/lps22hb.o ./Core/Src/lps22hb.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32l0xx_hal_msp.cyclo ./Core/Src/stm32l0xx_hal_msp.d ./Core/Src/stm32l0xx_hal_msp.o ./Core/Src/stm32l0xx_hal_msp.su ./Core/Src/stm32l0xx_it.cyclo ./Core/Src/stm32l0xx_it.d ./Core/Src/stm32l0xx_it.o ./Core/Src/stm32l0xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32l0xx.cyclo ./Core/Src/system_stm32l0xx.d ./Core/Src/system_stm32l0xx.o ./Core/Src/system_stm32l0xx.su
|
||||
-$(RM) ./Core/Src/adf7012.cyclo ./Core/Src/adf7012.d ./Core/Src/adf7012.o ./Core/Src/adf7012.su ./Core/Src/gps.cyclo ./Core/Src/gps.d ./Core/Src/gps.o ./Core/Src/gps.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32l0xx_hal_msp.cyclo ./Core/Src/stm32l0xx_hal_msp.d ./Core/Src/stm32l0xx_hal_msp.o ./Core/Src/stm32l0xx_hal_msp.su ./Core/Src/stm32l0xx_it.cyclo ./Core/Src/stm32l0xx_it.d ./Core/Src/stm32l0xx_it.o ./Core/Src/stm32l0xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32l0xx.cyclo ./Core/Src/system_stm32l0xx.d ./Core/Src/system_stm32l0xx.o ./Core/Src/system_stm32l0xx.su
|
||||
|
||||
.PHONY: clean-Core-2f-Src
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"./Core/Src/adf7012.o"
|
||||
"./Core/Src/lps22hb.o"
|
||||
"./Core/Src/gps.o"
|
||||
"./Core/Src/main.o"
|
||||
"./Core/Src/stm32l0xx_hal_msp.o"
|
||||
"./Core/Src/stm32l0xx_it.o"
|
||||
|
|
Plik binarny nie jest wyświetlany.
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.access_port_id" value="0"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.cubeprog_external_loaders" value="[]"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_certif_path" value=""/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_check_enable" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_key_path" value=""/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_permission" value="debug_non_secure_L3"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="false"/>
|
||||
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.formatVersion" value="2"/>
|
||||
|
@ -22,16 +27,13 @@
|
|||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="true"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_allow_halt" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_signal_halt" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_external_loader" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_logging" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_max_halt_delay" value="false"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_shared_stlink" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.external_loader" value=""/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.external_loader_init" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="C:\Users\Jed\STM32CubeIDE\workspace_1.10.1\radiosonda_m20\Debug\st-link_gdbserver_log.txt"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="enable"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="none"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="connect_under_reset"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="false"/>
|
||||
|
@ -69,6 +71,7 @@
|
|||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="radiosonda_m20"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1853761419"/>
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/radiosonda_m20"/>
|
||||
</listAttribute>
|
||||
|
|
|
@ -83,12 +83,12 @@ MxDb.Version=DB.6.0.100
|
|||
NVIC.DMA1_Channel2_3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
|
||||
NVIC.ForceEnableDMAVector=true
|
||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.LPUART1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
|
||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:false
|
||||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
|
||||
NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:true\:false\:true\:false
|
||||
NVIC.TIM21_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
|
||||
NVIC.USART1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
|
||||
PA1.GPIOParameters=GPIO_Label
|
||||
PA1.GPIO_Label=IR_RX
|
||||
PA1.Locked=true
|
||||
|
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 2.4 MiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 458 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 611 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 1.3 MiB |
Ładowanie…
Reference in New Issue