Browse Source

initialize SPI1_CS to drive high

master
Daniel Peter Chokola 2 years ago
parent
commit
6221ed0917
  1. 2
      Core/Src/gpio.c
  2. 5
      hothouse-mon.ioc

2
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); HAL_GPIO_WritePin(SPI2_CS_GPIO_Port, SPI2_CS_Pin, GPIO_PIN_SET);
/*Configure GPIO pin Output Level */ /*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 */ /*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = BME280_PWR_Pin; GPIO_InitStruct.Pin = BME280_PWR_Pin;

5
hothouse-mon.ioc

@ -61,9 +61,10 @@ PA13.Mode=Serial_Wire
PA13.Signal=SYS_JTMS-SWDIO PA13.Signal=SYS_JTMS-SWDIO
PA14.Mode=Serial_Wire PA14.Mode=Serial_Wire
PA14.Signal=SYS_JTCK-SWCLK PA14.Signal=SYS_JTCK-SWCLK
PA15.GPIOParameters=GPIO_Label PA15.GPIOParameters=PinState,GPIO_Label
PA15.GPIO_Label=SPI1_CS PA15.GPIO_Label=SPI1_CS
PA15.Locked=true PA15.Locked=true
PA15.PinState=GPIO_PIN_SET
PA15.Signal=GPIO_Output PA15.Signal=GPIO_Output
PB12.GPIOParameters=GPIO_Speed,PinState,GPIO_Label PB12.GPIOParameters=GPIO_Speed,PinState,GPIO_Label
PB12.GPIO_Label=SPI2_CS PB12.GPIO_Label=SPI2_CS
@ -127,7 +128,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=STM32CubeIDE ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation= ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=true 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.48MHZClocksFreq_Value=48000000
RCC.AHBFreq_Value=72000000 RCC.AHBFreq_Value=72000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2 RCC.APB1CLKDivider=RCC_HCLK_DIV2

Loading…
Cancel
Save