From 6221ed0917c18a6423c674bd5c7a6f3dceafdc80 Mon Sep 17 00:00:00 2001 From: Daniel Peter Chokola Date: Sun, 5 Mar 2023 09:57:12 -0500 Subject: [PATCH] initialize SPI1_CS to drive high --- Core/Src/gpio.c | 2 +- hothouse-mon.ioc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c index 84129c7..2561c7a 100644 --- a/Core/Src/gpio.c +++ b/Core/Src/gpio.c @@ -57,7 +57,7 @@ void MX_GPIO_Init(void) HAL_GPIO_WritePin(SPI2_CS_GPIO_Port, SPI2_CS_Pin, GPIO_PIN_SET); /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(SPI1_CS_GPIO_Port, SPI1_CS_Pin, GPIO_PIN_RESET); + HAL_GPIO_WritePin(SPI1_CS_GPIO_Port, SPI1_CS_Pin, GPIO_PIN_SET); /*Configure GPIO pin : PtPin */ GPIO_InitStruct.Pin = BME280_PWR_Pin; diff --git a/hothouse-mon.ioc b/hothouse-mon.ioc index eccc8cb..b52bb5c 100644 --- a/hothouse-mon.ioc +++ b/hothouse-mon.ioc @@ -61,9 +61,10 @@ PA13.Mode=Serial_Wire PA13.Signal=SYS_JTMS-SWDIO PA14.Mode=Serial_Wire PA14.Signal=SYS_JTCK-SWCLK -PA15.GPIOParameters=GPIO_Label +PA15.GPIOParameters=PinState,GPIO_Label PA15.GPIO_Label=SPI1_CS PA15.Locked=true +PA15.PinState=GPIO_PIN_SET PA15.Signal=GPIO_Output PB12.GPIOParameters=GPIO_Speed,PinState,GPIO_Label PB12.GPIO_Label=SPI2_CS @@ -127,7 +128,7 @@ ProjectManager.StackSize=0x400 ProjectManager.TargetToolchain=STM32CubeIDE ProjectManager.ToolChainLocation= ProjectManager.UnderRoot=true -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_SPI2_Init-SPI2-false-HAL-true,4-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_SPI2_Init-SPI2-false-HAL-true,4-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false,5-MX_SPI1_Init-SPI1-false-HAL-true RCC.48MHZClocksFreq_Value=48000000 RCC.AHBFreq_Value=72000000 RCC.APB1CLKDivider=RCC_HCLK_DIV2