Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
af112f4
files from spi
ars-24 Jan 6, 2026
0973267
Revert "files from spi"
ars-24 Jan 6, 2026
18a9d91
adding spi files to new branch
ars-24 Jan 6, 2026
12cd064
Fixed all errors in compilation and added proper CMake linkage for PE…
Colin-Bickel Jan 9, 2026
441e9a0
Automatic CMake Format: Standardized formatting automatically
github-actions[bot] Jan 9, 2026
5e41de1
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 9, 2026
87f3a19
Merge branch 'main' into spi_new
dchansen06 Jan 9, 2026
ca5b392
Merge branch 'main' into spi_new
dchansen06 Jan 9, 2026
664c7ec
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 9, 2026
f5b812a
set up spi parameters for test + GR_SPI_Close()
horizon-ab Jan 13, 2026
30e9db8
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 13, 2026
ebf51bf
comment out opsi
horizon-ab Jan 13, 2026
aa056da
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 13, 2026
a3b5430
compiles
horizon-ab Jan 13, 2026
4a62792
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 13, 2026
977c595
blinky not working
horizon-ab Jan 13, 2026
dd84787
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 13, 2026
e087906
Add SWO configuration for G4PERTESTING launch configuration
dchansen06 Jan 13, 2026
407d704
Add Logomatic logging and update clock configuration
dchansen06 Jan 13, 2026
f132a18
Merge branch 'main' into spi_new
dchansen06 Jan 13, 2026
2411769
Changed print statements to LOGOMATIC
Colin-Bickel Jan 16, 2026
f4318f4
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 16, 2026
064f022
Co-authored-by: Colin-Bickel <Colin-Bickel@users.noreply.github.com>
ars-24 Jan 16, 2026
0ec8e56
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 16, 2026
cab7d46
Merge branch 'main' into spi_new
dchansen06 Jan 16, 2026
b2ef603
Merge branch 'main' into spi_new
dchansen06 Jan 20, 2026
6698c11
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 20, 2026
5513329
Fixed SPI enable bug
Colin-Bickel Jan 23, 2026
b4cb697
Began testing send/receive
Colin-Bickel Jan 23, 2026
4dd16f4
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 23, 2026
7e07d7c
Merge branch 'main' into spi_new
dchansen06 Jan 23, 2026
3fb67cb
Implemented fixes for GR_SPI_Send/Receive and their helper funcs + init
Colin-Bickel Jan 27, 2026
9ba5ac1
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 27, 2026
ca0ab7a
GR_SPI_Begin_New_Tx has a preemption issue. SPI read data is reading …
Colin-Bickel Jan 27, 2026
6f25e62
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Jan 27, 2026
5bc1c89
Merge branch 'main' into spi_new
dchansen06 Jan 28, 2026
a6e66b8
Merge branch 'main' into spi_new
dchansen06 Feb 1, 2026
0ea1afa
Merge branch 'main' into spi_new
dchansen06 Feb 1, 2026
e7f1f5a
Merge branch 'main' into spi_new
dchansen06 Feb 2, 2026
9bb7a78
Merge branch 'main' into spi_new
dchansen06 Feb 2, 2026
1d21c87
Merge branch 'main' into spi_new
dchansen06 Feb 3, 2026
5b4f228
Merge branch 'main' into spi_new
dchansen06 Feb 3, 2026
35b1d39
MVP working
Colin-Bickel Feb 3, 2026
6db350e
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Feb 3, 2026
e0ad2c7
In the process of cleaning up the API
Colin-Bickel Feb 3, 2026
b898b08
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Feb 3, 2026
0ef3ecc
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Feb 3, 2026
0ea2018
Merge branch 'main' into spi_new
dchansen06 Feb 3, 2026
54fb16d
Shift over to `G4SPITESTING` instead
dchansen06 Feb 3, 2026
d758821
Merge branch 'main' into spi_new
dchansen06 Feb 3, 2026
56bc3b1
Delete `G4SPITESTING/G4PERTESTING.ioc`
dchansen06 Feb 3, 2026
cb7980a
Update README to reflect SPI testing changes
dchansen06 Feb 3, 2026
273c949
Merge branch 'main' into spi_new
dchansen06 Feb 10, 2026
24d4ce0
Merge branch 'main' into spi_new
dchansen06 Feb 10, 2026
6c4d2ff
Merge branch 'main' into spi_new
dchansen06 Feb 10, 2026
c2c0631
Merge branch 'main' into spi_new
dchansen06 Feb 12, 2026
a3593bb
Merge branch 'main' into spi_new
dchansen06 Feb 12, 2026
2720588
Co-authored-by: Bailey Say <baileyasay@gmail.com>
ars-24 Feb 13, 2026
1bf08e6
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Feb 13, 2026
e7fe839
fixing compile errors
ars-24 Feb 13, 2026
6f521f4
Merge branch 'main' into spi_new
dchansen06 Feb 13, 2026
74ac270
Setup new logomatic
dchansen06 Feb 14, 2026
4816200
Merge branch 'main' into spi_new
dchansen06 Feb 16, 2026
72f2664
Merge branch 'main' into spi_new
dchansen06 Feb 16, 2026
7b17197
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Feb 16, 2026
0be307b
Merge branch 'main' into spi_new
dchansen06 Feb 16, 2026
05fd862
Remove extraneous files
dchansen06 Feb 16, 2026
e70b5c8
Add testing pinout
dchansen06 Feb 16, 2026
c7f3243
Merge branch 'main' into spi_new
dchansen06 Feb 16, 2026
67adc6c
Update build command in tasks.json for CMake
dchansen06 Feb 16, 2026
4ca7ec6
Merge branch 'main' into spi_new
dchansen06 Feb 17, 2026
1872e7c
Merge branch 'main' into spi_new
dchansen06 Feb 17, 2026
20593f5
Merge branch 'main' into spi_new
dchansen06 Feb 20, 2026
5d960c7
Added MsgBuffer to replace CircularBuffer
Colin-Bickel Feb 20, 2026
7a40734
Edited API of MsgBuffer create & free
Colin-Bickel Feb 20, 2026
e646843
Merge branch 'main' into spi_new
dchansen06 Feb 20, 2026
b1230aa
Automatic Clang-Format: Standardized formatting automatically
github-actions[bot] Feb 20, 2026
c8d2c5c
Remove no longer needed files
dchansen06 Feb 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,37 @@
]
}
},
{
"cwd": "${workspaceFolder}",
"executable": "${command:cmake.buildDirectory}/G4SPITESTING.elf",
"name": "G4SPITESTING",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"configFiles": [
"interface/stlink.cfg",
"target/stm32g4x.cfg"
],
"searchDir": [],
"preLaunchTask": "CMake: configure and build G4SPITESTING",
"showDevDebugOutput": "raw",
"svdPath": "${workspaceFolder}/Lib/Vendor/CMSIS_5/SVD/STM32G474.svd",
"swoConfig": {
"enabled": true,
"cpuFrequency": 170000000,
"swoFrequency": 2000000,
"source": "probe",
"decoders": [
{
"type": "console",
"label": "ITM",
"showOnStartup": true,
"port": 0,
"encoding": "ascii"
}
]
}
},
{
"cwd": "${workspaceFolder}",
"executable": "${command:cmake.buildDirectory}/G4ADCTESTING.elf",
Expand Down
9 changes: 9 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
],
"command": "cmake --build --preset ${command:cmake.activeBuildPresetName} --target G4CANTESTING"
},
{
"label": "CMake: configure and build G4SPITESTING",
"type": "shell",
"dependsOrder": "sequence",
"dependsOn": [
"CMake: configure"
],
"command": "cmake --build --preset ${command:cmake.activeBuildPresetName} --target G4SPITESTING"
},
{
"label": "CMake: configure and build G4BLINKY",
"type": "shell",
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ include("${lib_path}/GlobalShare/common.cmake")
include("${lib_path}/Utils/Logomatic/logomatic.cmake")
include("${lib_path}/Utils/CircularBuffer/circular-buffer-lib.cmake")
include("${lib_path}/cmake/gr-lib.cmake")
include("${lib_path}/FancyLayers-RENAME/SPI/spi.cmake")
include("${lib_path}/Utils/BitManipulations/bit-utils.cmake")

# Peripherals
Expand Down Expand Up @@ -68,8 +69,9 @@ add_gr_project(STM32G474xE CCU)
add_gr_project(STM32G474xE AnalogCalibration)

# Development
add_gr_project(STM32G474xE G4ADCTESTING)
add_gr_project(STM32G474xE G4PERTESTING)
add_gr_project(STM32G474xE G4SPITESTING)
add_gr_project(STM32G474xE G4ADCTESTING)
add_gr_project(STM32G474xE G4CANTESTING)

# BLINKY Demos
Expand Down
39 changes: 39 additions & 0 deletions G4SPITESTING/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.25)

# Setup compiler settings
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)

# Define the build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif()

# Enable compile command to ease indexing with e.g. clangd
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)

# Enable CMake support for ASM and C languages
enable_language(
C
ASM
)

# Core project settings
project(${CMAKE_PROJECT_NAME})

# what, does in fact not get the filename of somthing but rather the name of the project from the path
get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)

add_library(${PROJECT_NAME}_USER_CODE INTERFACE)
target_sources(
${PROJECT_NAME}_USER_CODE
INTERFACE
Core/Src/main.c
Core/Src/stm32g4xx_hal_msp.c
Core/Src/stm32g4xx_it.c
)

target_link_libraries(${PROJECT_NAME}_USER_CODE INTERFACE SPI_Lib)

target_include_directories(${PROJECT_NAME}_USER_CODE INTERFACE Core/Inc)
116 changes: 116 additions & 0 deletions G4SPITESTING/Core/Inc/main.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32g4xx_hal.h"
#include "stm32g4xx_ll_adc.h"
#include "stm32g4xx_ll_bus.h"
#include "stm32g4xx_ll_cortex.h"
#include "stm32g4xx_ll_crs.h"
#include "stm32g4xx_ll_dma.h"
#include "stm32g4xx_ll_exti.h"
#include "stm32g4xx_ll_gpio.h"
#include "stm32g4xx_ll_i2c.h"
#include "stm32g4xx_ll_lpuart.h"
#include "stm32g4xx_ll_pwr.h"
#include "stm32g4xx_ll_rcc.h"
#include "stm32g4xx_ll_spi.h"
#include "stm32g4xx_ll_system.h"
#include "stm32g4xx_ll_tim.h"
#include "stm32g4xx_ll_usart.h"
#include "stm32g4xx_ll_utils.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include <stdio.h>
#include <stdlib.h>
/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define BSPD_SIGNAL_Pin LL_GPIO_PIN_1
#define BSPD_SIGNAL_GPIO_Port GPIOC
#define APPS1_SIGNAL_Pin LL_GPIO_PIN_2
#define APPS1_SIGNAL_GPIO_Port GPIOC
#define APPS2_SIGNAL_Pin LL_GPIO_PIN_3
#define APPS2_SIGNAL_GPIO_Port GPIOC
#define BLINKY_Pin LL_GPIO_PIN_5
#define BLINKY_GPIO_Port GPIOA
#define IMD_SENSE_Pin LL_GPIO_PIN_6
#define IMD_SENSE_GPIO_Port GPIOA
#define AMS_SENSE_Pin LL_GPIO_PIN_7
#define AMS_SENSE_GPIO_Port GPIOA
#define BRAKE_F_SIGNAL_Pin LL_GPIO_PIN_0
#define BRAKE_F_SIGNAL_GPIO_Port GPIOB
#define BRAKE_R_SIGNAL_Pin LL_GPIO_PIN_1
#define BRAKE_R_SIGNAL_GPIO_Port GPIOB
#define LED_TEST_Pin LL_GPIO_PIN_11
#define LED_TEST_GPIO_Port GPIOB
#define AUX_SIGNAL_Pin LL_GPIO_PIN_14
#define AUX_SIGNAL_GPIO_Port GPIOB
#define STEERING_ANGLE_Pin LL_GPIO_PIN_15
#define STEERING_ANGLE_GPIO_Port GPIOB
#define BRAKE_LIGHT_Pin LL_GPIO_PIN_4
#define BRAKE_LIGHT_GPIO_Port GPIOB
#define TSSI_G_CONTROL_Pin LL_GPIO_PIN_5
#define TSSI_G_CONTROL_GPIO_Port GPIOB
#define AUX_CONTROL_Pin LL_GPIO_PIN_8
#define AUX_CONTROL_GPIO_Port GPIOB
#define SOFTWARE_OK_CONTROL_Pin LL_GPIO_PIN_9
#define SOFTWARE_OK_CONTROL_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
52 changes: 52 additions & 0 deletions G4SPITESTING/Core/Inc/stm32_assert.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32_assert.h
* @author MCD Application Team
* @brief STM32 assert file.
******************************************************************************
* @attention
*
* Copyright (c) 2019 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32_ASSERT_H
#define __STM32_ASSERT_H

#ifdef __cplusplus
extern "C" {
#endif

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t *file, uint32_t line);
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */

#ifdef __cplusplus
}
#endif

#endif /* __STM32_ASSERT_H */
Loading
Loading