comparison Common/Inc/global_constants.h @ 208:9fc06e1e0f66 ImprovmentSPI

Update SPI error display and handling For easier identification of a communication problem the RX state of Main and RTE is displayed in the debug view. Also error reactions are now handles based on this state. E.g. RTE resets its DMA incase Main reports a data shift which can not be resolved by Main itself In addition the timeout for error detection has been decreased to have a faster reaction
author ideenmodellierer
date Sun, 24 Mar 2019 22:57:28 +0100
parents c659fda83e44
children a6c0375bc950
comparison
equal deleted inserted replaced
207:b95741467355 208:9fc06e1e0f66
38 38
39 // Spi sync data debug 39 // Spi sync data debug
40 #define SPI_SHOW_SYNC_STATS 0 40 #define SPI_SHOW_SYNC_STATS 0
41 #define SPI_MIN_ERROR_SHOW 10 41 #define SPI_MIN_ERROR_SHOW 10
42 42
43 // SPI header by index used for synchronization check (package sequence counter) 43 /* Define INDEX for information exchanged within the header */
44 #define SPI_HEADER_INDEX_MASTER 1 44 #define SPI_HEADER_INDEX_RX_STATE (1)
45 #define SPI_HEADER_INDEX_SLAVE 2 45 #define SPI_HEADER_INDEX_FRAME_CNT (2)
46 46
47 #define SPI_RX_STATE_OK (0)
48 #define SPI_RX_STATE_SHIFTED (1)
49 #define SPI_RX_STATE_OFFLINE (2)
50 #define SPI_RX_STATE_INVALID (3)
47 51
48 //Text data 52 //Text data
49 #define TEXT_PRESSURE_UNIT "hPa" 53 #define TEXT_PRESSURE_UNIT "hPa"
50 #endif 54 #endif