dump
This commit is contained in:
parent
086b908e17
commit
0c49ec0e88
|
@ -1,5 +1,5 @@
|
|||
@echo off
|
||||
rm -rf .dep/
|
||||
rem rm -rf .dep/
|
||||
|
||||
rm -rf build\rusefi.hex
|
||||
rm -rf build\rusefi.bin
|
||||
|
|
|
@ -20,14 +20,70 @@
|
|||
*/
|
||||
|
||||
#include "hal.h"
|
||||
#include "stm32_gpio.h"
|
||||
|
||||
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||
|
||||
/**
|
||||
* @brief Type of STM32 GPIO port setup.
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t moder;
|
||||
uint32_t otyper;
|
||||
uint32_t ospeedr;
|
||||
uint32_t pupdr;
|
||||
uint32_t odr;
|
||||
uint32_t afrl;
|
||||
uint32_t afrh;
|
||||
} gpio_setup_t;
|
||||
|
||||
/**
|
||||
* @brief Type of STM32 GPIO initialization data.
|
||||
*/
|
||||
typedef struct {
|
||||
#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
|
||||
gpio_setup_t PAData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
|
||||
gpio_setup_t PBData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
|
||||
gpio_setup_t PCData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
|
||||
gpio_setup_t PDData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
|
||||
gpio_setup_t PEData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
|
||||
gpio_setup_t PFData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
|
||||
gpio_setup_t PGData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
|
||||
gpio_setup_t PHData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
|
||||
gpio_setup_t PIData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
|
||||
gpio_setup_t PJData;
|
||||
#endif
|
||||
#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
|
||||
gpio_setup_t PKData;
|
||||
#endif
|
||||
} gpio_config_t;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief PAL setup.
|
||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||
* This variable is used by the HAL when initializing the PAL driver.
|
||||
*/
|
||||
const PALConfig pal_default_config = {
|
||||
static const gpio_config_t gpio_default_config = {
|
||||
#if STM32_HAS_GPIOA
|
||||
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
|
||||
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
||||
|
@ -62,18 +118,68 @@ const PALConfig pal_default_config = {
|
|||
#endif
|
||||
#if STM32_HAS_GPIOI
|
||||
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
|
||||
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOJ
|
||||
{VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
|
||||
VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOK
|
||||
{VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
|
||||
VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
|
||||
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
||||
#endif
|
||||
};
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
|
||||
|
||||
gpiop->OTYPER = config->otyper;
|
||||
gpiop->OSPEEDR = config->ospeedr;
|
||||
gpiop->PUPDR = config->pupdr;
|
||||
gpiop->ODR = config->odr;
|
||||
gpiop->AFRL = config->afrl;
|
||||
gpiop->AFRH = config->afrh;
|
||||
gpiop->MODER = config->moder;
|
||||
}
|
||||
|
||||
static void stm32_gpio_init(void) {
|
||||
|
||||
/* Enabling GPIO-related clocks, the mask comes from the
|
||||
registry header file.*/
|
||||
rccResetAHB1(STM32_GPIO_EN_MASK);
|
||||
rccEnableAHB1(STM32_GPIO_EN_MASK, true);
|
||||
|
||||
/* Initializing all the defined GPIO ports.*/
|
||||
#if STM32_HAS_GPIOA
|
||||
gpio_init(GPIOA, &gpio_default_config.PAData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOB
|
||||
gpio_init(GPIOB, &gpio_default_config.PBData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOC
|
||||
gpio_init(GPIOC, &gpio_default_config.PCData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOD
|
||||
gpio_init(GPIOD, &gpio_default_config.PDData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOE
|
||||
gpio_init(GPIOE, &gpio_default_config.PEData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOF
|
||||
gpio_init(GPIOF, &gpio_default_config.PFData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOG
|
||||
gpio_init(GPIOG, &gpio_default_config.PGData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOH
|
||||
gpio_init(GPIOH, &gpio_default_config.PHData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOI
|
||||
gpio_init(GPIOI, &gpio_default_config.PIData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOJ
|
||||
gpio_init(GPIOJ, &gpio_default_config.PJData);
|
||||
#endif
|
||||
#if STM32_HAS_GPIOK
|
||||
gpio_init(GPIOK, &gpio_default_config.PKData);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Early initialization code.
|
||||
|
@ -82,8 +188,10 @@ const PALConfig pal_default_config = {
|
|||
*/
|
||||
void __early_init(void) {
|
||||
|
||||
stm32_clock_init();
|
||||
stm32_gpio_init();
|
||||
stm32_clock_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAL_USE_SDC || defined(__DOXYGEN__)
|
||||
/**
|
||||
|
|
|
@ -1604,22 +1604,22 @@
|
|||
PIN_ODR_HIGH(GPIOK_PIN13) | \
|
||||
PIN_ODR_HIGH(GPIOK_PIN14) | \
|
||||
PIN_ODR_HIGH(GPIOK_PIN15))
|
||||
#define VAL_GPIOK_AFRL (PIN_AFIO_AF(GPIOK_PIN0, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN1, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN2, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_LED4, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN4, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN5, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN6, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN7, 0))
|
||||
#define VAL_GPIOK_AFRH (PIN_AFIO_AF(GPIOK_PIN8, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN9, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN10, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN11, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN12, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN13, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN14, 0) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN15, 0))
|
||||
#define VAL_GPIOK_AFRL (PIN_AFIO_AF(GPIOK_PIN0, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN1, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN2, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN3, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN4, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN5, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN6, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN7, 0U))
|
||||
#define VAL_GPIOK_AFRH (PIN_AFIO_AF(GPIOK_PIN8, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN9, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN10, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN11, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN12, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN13, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN14, 0U) | \
|
||||
PIN_AFIO_AF(GPIOK_PIN15, 0U))
|
||||
|
||||
#if !defined(_FROM_ASM_)
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -23,11 +23,14 @@
|
|||
#define HAL_USE_SERIAL FALSE
|
||||
|
||||
#undef HAL_USE_UART
|
||||
#if TS_UART_DMA_MODE
|
||||
//#if TS_UART_DMA_MODE
|
||||
#define HAL_USE_UART TRUE
|
||||
#else
|
||||
#define HAL_USE_UART FALSE
|
||||
#endif
|
||||
//#else
|
||||
//#define HAL_USE_UART FALSE
|
||||
//#endif
|
||||
|
||||
#undef UART_USE_WAIT
|
||||
#define UART_USE_WAIT TRUE
|
||||
|
||||
#undef HAL_USE_USB
|
||||
#define HAL_USE_USB FALSE
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
#define STM32_SERIAL_USE_USART3 FALSE
|
||||
|
||||
#undef STM32_SERIAL_USE_UART4
|
||||
#if TS_UART_DMA_MODE
|
||||
//#if TS_UART_DMA_MODE
|
||||
#define STM32_SERIAL_USE_UART4 FALSE
|
||||
#else
|
||||
#define STM32_SERIAL_USE_UART4 TRUE
|
||||
#endif
|
||||
//#else
|
||||
//#define STM32_SERIAL_USE_UART4 TRUE
|
||||
//#endif
|
||||
|
||||
#undef STM32_UART_USE_USART3
|
||||
#define STM32_UART_USE_USART3 FALSE
|
||||
|
|
|
@ -202,7 +202,7 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
/**
|
||||
* *0.01 because of https://sourceforge.net/p/rusefi/tickets/153/
|
||||
*/
|
||||
float rawVe = veMap.getValue(rpm, map);
|
||||
float rawVe = veMap.getValue(rpm, CONFIG(useTPSVETable) ? tps : map);
|
||||
// get VE from the separate table for Idle
|
||||
if (CONFIG(useSeparateVeForIdle)) {
|
||||
float idleVe = interpolate2d("idleVe", rpm, config->idleVeBins, config->idleVe, IDLE_VE_CURVE_SIZE);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Feb 10 20:05:25 EST 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Feb 11 23:47:09 EET 2019
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -1466,7 +1466,7 @@ typedef struct {
|
|||
bool useTPSAdvanceTable : 1;
|
||||
/**
|
||||
offset 1484 bit 20 */
|
||||
bool unused_1484_bit_20 : 1;
|
||||
bool useTPSVETable : 1;
|
||||
/**
|
||||
offset 1484 bit 21 */
|
||||
bool unused_1484_bit_21 : 1;
|
||||
|
@ -2481,4 +2481,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Feb 10 20:05:25 EST 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Feb 11 23:47:09 EET 2019
|
||||
|
|
|
@ -976,8 +976,8 @@
|
|||
#define useAdvanceCorrectionsForCranking_offset_hex 5cc
|
||||
#define useTPSAdvanceTable_offset 1484
|
||||
#define useTPSAdvanceTable_offset_hex 5cc
|
||||
#define unused_1484_bit_20_offset 1484
|
||||
#define unused_1484_bit_20_offset_hex 5cc
|
||||
#define useTPSVETable_offset 1484
|
||||
#define useTPSVETable_offset_hex 5cc
|
||||
#define unused_1484_bit_21_offset 1484
|
||||
#define unused_1484_bit_21_offset_hex 5cc
|
||||
#define engineChartSize_offset 1488
|
||||
|
|
|
@ -699,7 +699,7 @@ bit useFixedBaroCorrFromMap
|
|||
bit useSeparateAdvanceForCranking
|
||||
bit useAdvanceCorrectionsForCranking
|
||||
bit useTPSAdvanceTable
|
||||
bit unused_1484_bit_20
|
||||
bit useTPSVETable
|
||||
bit unused_1484_bit_21
|
||||
|
||||
uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// This file was generated by Version2Header
|
||||
// Mon Feb 04 20:12:05 EST 2019
|
||||
// Tue Feb 12 00:24:13 EET 2019
|
||||
|
||||
|
||||
#ifndef GIT_HASH
|
||||
#define GIT_HASH "06be31344801ab3aac7d0e8334ca819780df37f0"
|
||||
#define GIT_HASH "086b908e17b82a7705d7e6935571fdc29fd55786"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VCS_VERSION
|
||||
#define VCS_VERSION "16713"
|
||||
#define VCS_VERSION "16768"
|
||||
#endif
|
||||
|
|
|
@ -63,7 +63,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Feb 10 20:05:25 EST 2019
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Feb 11 23:47:09 EET 2019
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -504,7 +504,7 @@ page = 1
|
|||
useSeparateAdvanceForCranking= bits, U32, 1484, [17:17], "false", "true"
|
||||
useAdvanceCorrectionsForCranking= bits, U32, 1484, [18:18], "false", "true"
|
||||
useTPSAdvanceTable = bits, U32, 1484, [19:19], "false", "true"
|
||||
unused_1484_bit_20 = bits, U32, 1484, [20:20], "false", "true"
|
||||
useTPSVETable = bits, U32, 1484, [20:20], "false", "true"
|
||||
unused_1484_bit_21 = bits, U32, 1484, [21:21], "false", "true"
|
||||
engineChartSize = scalar, U32, 1488, "count", 1, 0, 0, 300, 0
|
||||
idlePidRpmUpperLimit = scalar, S16, 1492, "RPM", 1, 0, 0, 9000, 0
|
||||
|
@ -2134,6 +2134,7 @@ cmd_set_engine_type_Miata_NA2 = "w\x00\x30\x00\x2F"
|
|||
field = "Mode", injectionMode, {isInjectionEnabled == 1}
|
||||
field = "#Batch injection with individual wiring"
|
||||
field = "Two wire batch emulation", twoWireBatchInjection, {isInjectionEnabled == 1 && injectionMode == 2}
|
||||
field = "Use TPS-based VE Table", useTPSVETable, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY}
|
||||
|
||||
dialog = ignitionSettings, "Ignition Settings"
|
||||
field = "Enabled", isIgnitionEnabled
|
||||
|
|
|
@ -1274,6 +1274,7 @@ cmd_set_engine_type_Miata_NA2 = "w\x00\x30\x00\x2F"
|
|||
field = "Mode", injectionMode, {isInjectionEnabled == 1}
|
||||
field = "#Batch injection with individual wiring"
|
||||
field = "Two wire batch emulation", twoWireBatchInjection, {isInjectionEnabled == 1 && injectionMode == 2}
|
||||
field = "Use TPS-based VE Table", useTPSVETable, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY}
|
||||
|
||||
dialog = ignitionSettings, "Ignition Settings"
|
||||
field = "Enabled", isIgnitionEnabled
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Feb 10 20:05:25 EST 2019
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Feb 11 23:47:09 EET 2019
|
||||
public class Fields {
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int BLOCKING_FACTOR = 400;
|
||||
|
@ -659,7 +659,7 @@ public class Fields {
|
|||
public static final int useSeparateAdvanceForCranking_offset = 1484;
|
||||
public static final int useAdvanceCorrectionsForCranking_offset = 1484;
|
||||
public static final int useTPSAdvanceTable_offset = 1484;
|
||||
public static final int unused_1484_bit_20_offset = 1484;
|
||||
public static final int useTPSVETable_offset = 1484;
|
||||
public static final int unused_1484_bit_21_offset = 1484;
|
||||
public static final int engineChartSize_offset = 1488;
|
||||
public static final int idlePidRpmUpperLimit_offset = 1492;
|
||||
|
@ -1635,7 +1635,7 @@ public class Fields {
|
|||
public static final Field USESEPARATEADVANCEFORCRANKING = Field.create("USESEPARATEADVANCEFORCRANKING", 1484, FieldType.BIT, 17);
|
||||
public static final Field USEADVANCECORRECTIONSFORCRANKING = Field.create("USEADVANCECORRECTIONSFORCRANKING", 1484, FieldType.BIT, 18);
|
||||
public static final Field USETPSADVANCETABLE = Field.create("USETPSADVANCETABLE", 1484, FieldType.BIT, 19);
|
||||
public static final Field UNUSED_1484_BIT_20 = Field.create("UNUSED_1484_BIT_20", 1484, FieldType.BIT, 20);
|
||||
public static final Field USETPSVETABLE = Field.create("USETPSVETABLE", 1484, FieldType.BIT, 20);
|
||||
public static final Field UNUSED_1484_BIT_21 = Field.create("UNUSED_1484_BIT_21", 1484, FieldType.BIT, 21);
|
||||
public static final Field ENGINECHARTSIZE = Field.create("ENGINECHARTSIZE", 1488, FieldType.INT);
|
||||
public static final Field IDLEPIDRPMUPPERLIMIT = Field.create("IDLEPIDRPMUPPERLIMIT", 1492, FieldType.INT);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<roms>
|
||||
|
||||
<!-- Generated by ConfigDefinition utility on Wed Mar 28 16:53:21 EEST 2018 -->
|
||||
<!-- Generated by ConfigDefinition utility on Mon Feb 11 23:47:16 EET 2019 -->
|
||||
|
||||
<rom>
|
||||
<romid>
|
||||
|
|
Loading…
Reference in New Issue