diff Small_CPU/Src/baseCPU2.c @ 889:cf3967fe6924 Evo_2_23

GNSS work in progress
author heinrichsweikamp
date Fri, 06 Sep 2024 16:46:22 +0200
parents 17f02ac9da67
children 651d21777b61
line wrap: on
line diff
--- a/Small_CPU/Src/baseCPU2.c	Tue Sep 03 20:46:42 2024 +0200
+++ b/Small_CPU/Src/baseCPU2.c	Fri Sep 06 16:46:22 2024 +0200
@@ -143,6 +143,8 @@
 #include "tm_stm32f4_otp.h"
 #include "externalInterface.h"
 #include "uart.h"
+#include "GNSS.h"
+
 
 // From Common/Inc:
 #include "calc_crush.h"
@@ -150,9 +152,9 @@
 #include "FirmwareData.h"
 
 // From Common/Drivers/
-#include "stm32f4xx_hal.h"
 #include <stdio.h>
 
+
 uint8_t coldstart __attribute__((section (".noinit")));
 
 uint8_t hasExternalClock(void) {
@@ -415,7 +417,7 @@
 				GPIO_LED_GREEN_OFF();
 
 				GPIO_LED_RED_ON();
-				GPIO_VIBRATION_ON();
+				//GPIO_VIBRATION_ON();
 				HAL_Delay(100);
 				GPIO_LED_RED_OFF();
 				GPIO_VIBRATION_OFF();
@@ -427,6 +429,21 @@
 			MX_SPI1_Init();
 			SPI_Start_single_TxRx_with_Master(); /* be prepared for the first data exchange */
 			Scheduler_Request_sync_with_SPI(SPI_SYNC_METHOD_HARD);
+
+			// GNSS tests
+			GNSS_IO_init();
+			MX_USART6_UART_Init();
+			GNSS_Init(&GNSS_Handle, &huart6);
+			HAL_Delay(1000);
+			GNSS_LoadConfig(&GNSS_Handle);
+			HAL_Delay(10);
+			GNSS_GetUniqID(&GNSS_Handle);
+			GNSS_ParseBuffer(&GNSS_Handle);
+			HAL_Delay(10);
+			GNSS_GetPVTData(&GNSS_Handle);
+			GNSS_ParseBuffer(&GNSS_Handle);
+
+
 			global.mode = MODE_SURFACE;
 			break;