Initial support of MPPT 2420 HPX board
- Some flags changed to make the firmware compile for new STM32G431 MCU - Zephyr board definition added - Serial, OLED display and LED working - ADC compiling, but not yet working
This commit is contained in:
@@ -19,6 +19,11 @@
|
||||
#define STM32F072
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_STM32G431XX
|
||||
#define STM32G4
|
||||
#define STM32G431
|
||||
#endif
|
||||
|
||||
#ifdef STM32L073
|
||||
#include "stm32l073xx.h"
|
||||
#endif
|
||||
@@ -27,6 +32,10 @@
|
||||
#include "stm32f072xx.h"
|
||||
#endif
|
||||
|
||||
#ifdef STM32G431
|
||||
#include "stm32g431xx.h"
|
||||
#endif
|
||||
|
||||
// factory calibration values for internal voltage reference and temperature sensor
|
||||
// (see MCU datasheet, not Reference Manual)
|
||||
#if defined(STM32F0)
|
||||
@@ -43,6 +52,13 @@
|
||||
const uint16_t TSENSE_CAL2 = *((uint16_t *)0x1FF8007E);
|
||||
#define TSENSE_CAL1_VALUE 30.0 // temperature of first calibration point
|
||||
#define TSENSE_CAL2_VALUE 130.0 // temperature of second calibration point
|
||||
#elif defined(STM32G4)
|
||||
const uint16_t VREFINT_CAL = *((uint16_t *)0x1FFF75AA); // VREFINT @3.0V/30°C
|
||||
#define VREFINT_VALUE 3000 // mV
|
||||
const uint16_t TSENSE_CAL1 = *((uint16_t *)0x1FFF75A8);
|
||||
const uint16_t TSENSE_CAL2 = *((uint16_t *)0x1FFF75CA);
|
||||
#define TSENSE_CAL1_VALUE 30.0 // temperature of first calibration point
|
||||
#define TSENSE_CAL2_VALUE 110.0 // temperature of second calibration point
|
||||
#elif defined(UNIT_TEST)
|
||||
#define VREFINT_CAL (4096 * 1.224 / 3.0) // VREFINT @3.0V/25°C
|
||||
#define VREFINT_VALUE 3000 // mV
|
||||
|
||||
Reference in New Issue
Block a user