diff Small_CPU/Src/spi.c @ 88:3db7389d49cc kittz

revert
author Dmitry Romanov <kitt@bk.ru>
date Thu, 22 Nov 2018 12:02:55 +0300
parents 923c4566a2a1
children ff7775cc34c4
line wrap: on
line diff
--- a/Small_CPU/Src/spi.c	Wed Nov 21 13:57:58 2018 +0300
+++ b/Small_CPU/Src/spi.c	Thu Nov 22 12:02:55 2018 +0300
@@ -140,7 +140,7 @@
   hspi1.Init.CLKPolarity 				= SPI_POLARITY_LOW;
   hspi1.Init.CLKPhase 					= SPI_PHASE_1EDGE;
   hspi1.Init.NSS 								= SPI_NSS_HARD_INPUT;//SPI_NSS_SOFT;
-  hspi1.Init.BaudRatePrescaler	= SPI_BAUDRATEPRESCALER_64;
+  hspi1.Init.BaudRatePrescaler	= SPI_BAUDRATEPRESCALER_128;
   hspi1.Init.FirstBit 					= SPI_FIRSTBIT_MSB;
   hspi1.Init.TIMode 						= SPI_TIMODE_DISABLED;
   hspi1.Init.CRCCalculation 		= SPI_CRCCALCULATION_DISABLED;//_DISABLED; _ENABLED;
@@ -188,7 +188,7 @@
 		hdma_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
 		hdma_tx.Init.MemDataAlignment    = DMA_MDATAALIGN_BYTE;
 		hdma_tx.Init.Mode                = DMA_NORMAL;
-		hdma_tx.Init.Priority            = DMA_PRIORITY_VERY_HIGH;
+		hdma_tx.Init.Priority            = DMA_PRIORITY_LOW;
 		hdma_tx.Init.FIFOMode            = DMA_FIFOMODE_DISABLE;         
 		hdma_tx.Init.FIFOThreshold       = DMA_FIFO_THRESHOLD_FULL;
 		hdma_tx.Init.MemBurst            = DMA_MBURST_INC4;
@@ -369,11 +369,10 @@
 	}
 	global.dataSendToMaster.power_on_reset = 0;
 	global.deviceDataSendToMaster.power_on_reset = 0;
-//	if(global.dataUpdateIsNeeded)
-//		{
-	scheduleSpecial_Evaluate_DataSendToSlave();
-//		global.dataUpdateIsNeeded=0;
-//		}
+	if(!global.dataSendToSlaveStopEval)
+		{
+		scheduleSpecial_Evaluate_DataSendToSlave();
+		}
 	SPI_Start_single_TxRx_with_Master();
   }
 }