diff Small_CPU/Src/baseCPU2.c @ 104:22a1094545f3 kittz

Tested and alive.
author Dmitry Romanov <kitt@bk.ru>
date Mon, 24 Dec 2018 16:15:02 +0300
parents f5d2f02dc73f
children 68181cd61f20
line wrap: on
line diff
--- a/Small_CPU/Src/baseCPU2.c	Wed Nov 28 09:36:33 2018 +0300
+++ b/Small_CPU/Src/baseCPU2.c	Mon Dec 24 16:15:02 2018 +0300
@@ -370,7 +370,7 @@
 			MX_DMA_Init();
 			MX_SPI1_Init();
 			MX_EXTI_wireless_Init();
-			SPI_Start_single_TxRx_with_Master();
+//			SPI_Start_single_TxRx_with_Master();
 			EXTI_Test_Button_Init();
 
 			/*
@@ -466,11 +466,11 @@
 			compass_init(0, 7);
 			accelerator_init();
 			wireless_init();
-			SPI_synchronize_with_Master();
+			SPI_synchronize_with_Master(); //one manual start cycle.
 			MX_DMA_Init();
 			MX_SPI1_Init();
 			MX_EXTI_wireless_Init();
-			SPI_Start_single_TxRx_with_Master();
+//			SPI_Start_single_TxRx_with_Master();
 
 			// EXTILine0_Button_DeInit(); not now, later after testing
 			break;
@@ -1079,7 +1079,25 @@
 /**
  * @}
  */
+/**
+  * @brief  This function handles SysTick Handler.
+  * @param  None
+  * @retval None
+  */
 
+/*TxRx only here. Every 100 ms.*/
+uint8_t ticks100ms=0;
+void SysTick_Handler(void)
+{
+  HAL_IncTick();
+  if(ticks100ms<100){
+	  ticks100ms++;
+  }else
+  {
+	  ticks100ms=0;
+	  SPI_Start_single_TxRx_with_Master();
+  }
+}
 /**
  * @}
  */