diff Discovery/Src/data_exchange_main.c @ 90:83857eb3b12b kittz

+- stable
author Dmitry Romanov <kitt@bk.ru>
date Fri, 23 Nov 2018 18:14:56 +0300
parents ff7775cc34c4
children 6a2308b9a3d4
line wrap: on
line diff
--- a/Discovery/Src/data_exchange_main.c	Fri Nov 23 16:52:21 2018 +0300
+++ b/Discovery/Src/data_exchange_main.c	Fri Nov 23 18:14:56 2018 +0300
@@ -306,7 +306,7 @@
 	uint8_t SPI_DMA_answer = 0;
 	
 	HAL_GPIO_WritePin(SMALLCPU_CSB_GPIO_PORT,SMALLCPU_CSB_PIN,GPIO_PIN_SET);
-	delayMicros(30); //~exchange time(+20% reserve)
+	delayMicros(50); //~exchange time(+20% reserve)
 	HAL_GPIO_WritePin(SMALLCPU_CSB_GPIO_PORT,SMALLCPU_CSB_PIN,GPIO_PIN_RESET);
 	/* one cycle with NotChipSelect true to clear slave spi buffer */
 
@@ -457,9 +457,9 @@
         return;
 	if(stateUsed == stateRealGetPointer())
 		pStateUsed = stateRealGetPointerWrite();
-	else
+	else{
 		pStateUsed = stateSimGetPointerWrite();
-
+	}
 
 		if(decoLock == DECO_CALC_init_as_is_start_of_dive)
 		{