STM32 EEPROM Testing
Dependencies: mbed
cal.h@0:77080c9376de, 2018-04-04 (annotated)
- Committer:
- chromaticdeth87
- Date:
- Wed Apr 04 15:16:19 2018 +0000
- Revision:
- 0:77080c9376de
This is the Test for the Flash to EEPROM operations on STM32F334C8T6
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| chromaticdeth87 | 0:77080c9376de | 1 | #ifndef CAL_H |
| chromaticdeth87 | 0:77080c9376de | 2 | #define CAL_H |
| chromaticdeth87 | 0:77080c9376de | 3 | |
| chromaticdeth87 | 0:77080c9376de | 4 | |
| chromaticdeth87 | 0:77080c9376de | 5 | typedef struct { |
| chromaticdeth87 | 0:77080c9376de | 6 | float uv_zero_mV; // uv adc mV reading at 0 ppb |
| chromaticdeth87 | 0:77080c9376de | 7 | float uv_cal_mV; // uv adc mV reading at calibration point |
| chromaticdeth87 | 0:77080c9376de | 8 | float uv_cal_ppb; // uv user ppb value at calibration point |
| chromaticdeth87 | 0:77080c9376de | 9 | |
| chromaticdeth87 | 0:77080c9376de | 10 | float vis_zero_mV; |
| chromaticdeth87 | 0:77080c9376de | 11 | float vis_cal_mV; |
| chromaticdeth87 | 0:77080c9376de | 12 | float vis_cal_ppb; |
| chromaticdeth87 | 0:77080c9376de | 13 | |
| chromaticdeth87 | 0:77080c9376de | 14 | uint16_t trim_4mA; // 12-bit dac value to use for 4 mA |
| chromaticdeth87 | 0:77080c9376de | 15 | uint16_t trim_20mA; // 12-bit dac value to use for 20 mA |
| chromaticdeth87 | 0:77080c9376de | 16 | float ppb_at_20mA; // ppb value equal to 20 mA, zero is assumed at 4 |
| chromaticdeth87 | 0:77080c9376de | 17 | |
| chromaticdeth87 | 0:77080c9376de | 18 | uint16_t padding; // needed to create multiple of 2 bytes |
| chromaticdeth87 | 0:77080c9376de | 19 | //double mAOffsetValue; //mA Offset Value for simulator project. |
| chromaticdeth87 | 0:77080c9376de | 20 | uint16_t checksum; |
| chromaticdeth87 | 0:77080c9376de | 21 | |
| chromaticdeth87 | 0:77080c9376de | 22 | } CALIBRATION_DATA; // compiler makes this a multiple of 2 bytes (half-word) |
| chromaticdeth87 | 0:77080c9376de | 23 | |
| chromaticdeth87 | 0:77080c9376de | 24 | extern CALIBRATION_DATA g_cal; |
| chromaticdeth87 | 0:77080c9376de | 25 | |
| chromaticdeth87 | 0:77080c9376de | 26 | void cal_init(); |
| chromaticdeth87 | 0:77080c9376de | 27 | void cal_save(); |
| chromaticdeth87 | 0:77080c9376de | 28 | void cal_print(); |
| chromaticdeth87 | 0:77080c9376de | 29 | void cal_factory(); |
| chromaticdeth87 | 0:77080c9376de | 30 | void cal_test(); |
| chromaticdeth87 | 0:77080c9376de | 31 | |
| chromaticdeth87 | 0:77080c9376de | 32 | #endif |