comparison Small_CPU/Inc/scheduler.h @ 265:a91d99265884 IPC_Sync_Improvment_2

Increase SPI com timeout for cold start and wake up There are use cases which cause the startup at Main to be longer than 300ms. In that case error reaction on RTE side would take place even if not needed. On the other hand having an longer timeout delays timeout detection and therefor the time till connection is reestablished => Added function to separate startup from common operation use case
author ideenmodellierer
date Sun, 14 Apr 2019 14:22:41 +0200
parents b3685fbada3b
children aa6006975e76
comparison
equal deleted inserted replaced
264:b3685fbada3b 265:a91d99265884
37 #define SPI_SYNC_METHOD_SOFT (2u) /* Scheduler shall reset adjust counters to 100ms SPI data exchange cycle */ 37 #define SPI_SYNC_METHOD_SOFT (2u) /* Scheduler shall reset adjust counters to 100ms SPI data exchange cycle */
38 #define SPI_SYNC_METHOD_INVALID (4u) 38 #define SPI_SYNC_METHOD_INVALID (4u)
39 39
40 #define SCHEDULER_TICK_EXE1SEC (980u) /* tick count based on cycle start which is used to trigger functions which */ 40 #define SCHEDULER_TICK_EXE1SEC (980u) /* tick count based on cycle start which is used to trigger functions which */
41 /* shall be executed once in a second (20ms before cycle restarts) */ 41 /* shall be executed once in a second (20ms before cycle restarts) */
42
43 #define SPI_COM_TIMEOUT_START (5) /* *100 ms timeout to avoid tiemout e.g. after Main wakeup */
44 #define SPI_COM_TIMEOUT_COMMON (3) /* *100ms shorter timeout during normal operation to have a faster error reaction */
42 45
43 typedef struct 46 typedef struct
44 { 47 {
45 uint8_t mode; 48 uint8_t mode;
46 short conservatism; 49 short conservatism;
82 { 85 {
83 uint8_t counterSPIdata100msec; 86 uint8_t counterSPIdata100msec;
84 uint8_t counterPressure100msec; 87 uint8_t counterPressure100msec;
85 uint8_t counterCompass100msec; 88 uint8_t counterCompass100msec;
86 uint8_t counterAmbientLight100msec; 89 uint8_t counterAmbientLight100msec;
90 uint8_t communicationTimeout;
87 uint32_t tick_execute1second; 91 uint32_t tick_execute1second;
88 uint32_t tickstart; 92 uint32_t tickstart;
89 } SScheduleCtrl; 93 } SScheduleCtrl;
90 94
91 95