|
Last change
on this file since 26 was 26, checked in by f.jahn, 3 months ago |
- Bug in ADC Kalibrierung (STM32 ADC Strom) behoben
- DMA Buffer für ADC 1 und ADC wird vor Überschreibung während bearbeitung geschützt, indem Datenübertragung nur einmalig erfolgt und erst nach Auswertung wieder gestartet wird
- RS485Modbus: Timeout Zeit wird für Baudraten >19200 korrekt berechnet
- Hardware ID geändert
- Separates Register für "Batterie Empty detection mode" auf Adresse 92 angelegt
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | /******************************************************************************
|
|---|
| 2 | *
|
|---|
| 3 | * @file fast_current.h
|
|---|
| 4 | * @author ECS, Falko Jahn
|
|---|
| 5 | * @version V1.0.0
|
|---|
| 6 | * @date 2022-01-16
|
|---|
| 7 | * @brief
|
|---|
| 8 | *
|
|---|
| 9 | ******************************************************************************/
|
|---|
| 10 | #ifndef __FAST_CURRENT_H
|
|---|
| 11 | #define __FAST_CURRENT_H
|
|---|
| 12 |
|
|---|
| 13 | //--- INCLUDEs -----------------------------------------------------------------
|
|---|
| 14 | #include <stdint.h>
|
|---|
| 15 | //--- GLOBALE TYPE DEFS --------------------------------------------------------
|
|---|
| 16 |
|
|---|
| 17 | //--- GLOBALE DEFINES ----------------------------------------------------------
|
|---|
| 18 | #define FAST_CURRENT_I_SENSE_GAIN 40.0
|
|---|
| 19 | #define FAST_CURRENT_ADC_OFFSET 32768
|
|---|
| 20 | #define FAST_CURRENT_ADC_RESOLUTION 32768 //65536/2 da im differential mode
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | #if (DEVICETYPE == 500)
|
|---|
| 24 | #define FAST_CURRENT_SHUNT_RESISTOR 0.000125
|
|---|
| 25 | #elif (DEVICETYPE == 250)
|
|---|
| 26 | #define FAST_CURRENT_SHUNT_RESISTOR 0.000250
|
|---|
| 27 | #elif (DEVICETYPE == 125)
|
|---|
| 28 | #define FAST_CURRENT_SHUNT_RESISTOR 0.000500
|
|---|
| 29 | #else
|
|---|
| 30 | #error No valid device type
|
|---|
| 31 | #endif
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 | //--- GLOBALE VARIABLEN PROTOTYPEN ---------------------------------------------
|
|---|
| 36 |
|
|---|
| 37 | //--- GLOBALE FUNKTIONS PROTOTYPEN ---------------------------------------------
|
|---|
| 38 | void FAST_CURRENT_Exec(uint32_t newVal );
|
|---|
| 39 | void CurrentOffsetCal(uint32_t newVal);
|
|---|
| 40 | void CurrentGainCal(uint32_t newVal);
|
|---|
| 41 |
|
|---|
| 42 | #endif //
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.