# HG changeset patch # User Ideenmodellierer # Date 1673724940 -3600 # Node ID 8f3a8c85a6c4301fe1081fc4bfb30d8b22c58424 # Parent 621265ec3d2370931270b3f62cef4c8fecd86f5c Bugfix data synchronization after RTE start: In previous version invalid data may be transferred in case the communication is corrupted directly after RTE startup. Root cause was that the data was evaluated without caring if a communication error was reported. In the new version the startup condition and evaluation of data is only done if valid data has been received by the RTE => SPI communication is up and runnig. diff -r 621265ec3d23 -r 8f3a8c85a6c4 Small_CPU/Src/spi.c --- a/Small_CPU/Src/spi.c Sat Jan 07 18:11:52 2023 +0100 +++ b/Small_CPU/Src/spi.c Sat Jan 14 20:35:40 2023 +0100 @@ -409,10 +409,13 @@ HAL_SPI_TransmitReceive_DMA(&hspi1,(uint8_t*) &(global.dataSendToMaster),(uint8_t*) &(global.dataSendToSlave), EXCHANGE_BUFFERSIZE); } - global.dataSendToMaster.power_on_reset = 0; - global.deviceDataSendToMaster.power_on_reset = 0; + if(global.dataSendToSlaveIsValid) + { + global.dataSendToMaster.power_on_reset = 0; + global.deviceDataSendToMaster.power_on_reset = 0; - scheduleSpecial_Evaluate_DataSendToSlave(); + scheduleSpecial_Evaluate_DataSendToSlave(); + } if(resettimeout) {