From 612161f175f00fb3b2efee5b861de94dbd1be514 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Thu, 3 Jun 2021 21:45:48 +0200 Subject: [PATCH] Switched RDY pin to open/drain to simplify hardware design --- Core/Src/main.c | 4 ++-- Makefile | 2 +- keyboard.ioc | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/Src/main.c b/Core/Src/main.c index 1b42b19..522e5bb 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -312,7 +312,7 @@ static void MX_I2C1_Init(void) hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; hi2c1.Init.OwnAddress2 = 0; hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; - hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; + hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_ENABLE; if (HAL_I2C_Init(&hi2c1) != HAL_OK) { Error_Handler(); @@ -420,7 +420,7 @@ static void MX_GPIO_Init(void) /*Configure GPIO pin : RDY_Pin */ GPIO_InitStruct.Pin = RDY_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(RDY_GPIO_Port, &GPIO_InitStruct); diff --git a/Makefile b/Makefile index 4cc367f..7c71d9e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ########################################################################################################################## -# File automatically-generated by tool: [projectgenerator] version: [3.11.2] date: [Tue Feb 09 18:45:25 CET 2021] +# File automatically-generated by tool: [projectgenerator] version: [3.13.0-B3] date: [Thu Jun 03 21:41:05 CEST 2021] ########################################################################################################################## # ------------------------------------------------ diff --git a/keyboard.ioc b/keyboard.ioc index 6a15095..6c7d19e 100644 --- a/keyboard.ioc +++ b/keyboard.ioc @@ -1,6 +1,6 @@ #MicroXplorer Configuration settings - do not modify Mcu.Family=STM32F1 -PA6.GPIOParameters=PinState,GPIO_Label +PA6.GPIOParameters=PinState,GPIO_Label,GPIO_ModeDefaultOutputPP ProjectManager.MainLocation=Core/Src PC15-OSC32_OUT.Mode=LSE-External-Oscillator PB13.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI @@ -128,6 +128,7 @@ Mcu.Pin13=PA14 Mcu.Pin14=PB6 PB14.GPIOParameters=GPIO_Label ProjectManager.ComputerToolchain=false +PA6.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 Mcu.Pin11=PA10 Mcu.Pin12=PA13