SourceFiles=stm32f0xx_it.c;main.c;\r
\r
[PreviousLibFiles]\r
-LibFiles=Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_gpio.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_exti.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_system.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_pwr.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_usart.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rcc.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_dma.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_bus.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_cortex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_utils.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_crs.h;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c;Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030x8.h;Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h;Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h;Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_armcc_V6.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cmSimd.h;\r
+LibFiles=Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_gpio.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_exti.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_system.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_i2c.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_dma.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_bus.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_cortex.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rcc.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_utils.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_pwr.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_usart.h;Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_crs.h;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_i2c.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c;Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c;Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f030x8.h;Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h;Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h;Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_armcc_V6.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cmSimd.h;\r
\r
[PreviousUsedMakefileFiles]\r
-SourceFiles=Src/main.c;Src/stm32f0xx_it.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c;/Src/system_stm32f0xx.c;/aux/misc/stm/F0-package/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;null;\r
+SourceFiles=Src/main.c;Src/stm32f0xx_it.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_i2c.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c;/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c;/Src/system_stm32f0xx.c;/aux/misc/stm/F0-package/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c;null;\r
HeaderPath=/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Inc;/aux/misc/stm/F0-package/Drivers/CMSIS/Device/ST/STM32F0xx/Include;/aux/misc/stm/F0-package/Drivers/CMSIS/Include;Inc;\r
CDefines=USE_FULL_LL_DRIVER;\r
\r
#define __MAIN_H__
/* Includes ------------------------------------------------------------------*/
+#include "stm32f0xx_ll_i2c.h"
#include "stm32f0xx_ll_crs.h"
#include "stm32f0xx_ll_rcc.h"
#include "stm32f0xx_ll_bus.h"
##########################################################################################################################
-# File automatically-generated by tool: [projectgenerator] version: [2.27.0] date: [Sat May 26 12:54:44 CEST 2018]
+# File automatically-generated by tool: [projectgenerator] version: [2.27.0] date: [Sat May 26 15:30:56 CEST 2018]
##########################################################################################################################
# ------------------------------------------------
/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c \
/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c \
/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c \
-/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c
+/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c \
+/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_i2c.c
# ASM sources
ASM_SOURCES = \
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_USART2_UART_Init(void);
+static void MX_I2C1_Init(void);
/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART2_UART_Init();
+ MX_I2C1_Init();
/* USER CODE BEGIN 2 */
run_test();
LL_SetSystemCoreClock(32000000);
+ LL_RCC_SetI2CClockSource(LL_RCC_I2C1_CLKSOURCE_HSI);
+
/* SysTick_IRQn interrupt configuration */
NVIC_SetPriority(SysTick_IRQn, 0);
}
+/* I2C1 init function */
+static void MX_I2C1_Init(void)
+{
+
+ LL_I2C_InitTypeDef I2C_InitStruct;
+
+ LL_GPIO_InitTypeDef GPIO_InitStruct;
+
+ /**I2C1 GPIO Configuration
+ PB6 ------> I2C1_SCL
+ PB7 ------> I2C1_SDA
+ */
+ GPIO_InitStruct.Pin = LL_GPIO_PIN_6;
+ GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
+ GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH;
+ GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_OPENDRAIN;
+ GPIO_InitStruct.Pull = LL_GPIO_PULL_UP;
+ GPIO_InitStruct.Alternate = LL_GPIO_AF_1;
+ LL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+
+ GPIO_InitStruct.Pin = LL_GPIO_PIN_7;
+ GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
+ GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH;
+ GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_OPENDRAIN;
+ GPIO_InitStruct.Pull = LL_GPIO_PULL_UP;
+ GPIO_InitStruct.Alternate = LL_GPIO_AF_1;
+ LL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+
+ /* Peripheral clock enable */
+ LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_I2C1);
+
+ /**I2C Initialization
+ */
+ I2C_InitStruct.PeripheralMode = LL_I2C_MODE_I2C;
+ I2C_InitStruct.Timing = 0x2000090E;
+ I2C_InitStruct.AnalogFilter = LL_I2C_ANALOGFILTER_ENABLE;
+ I2C_InitStruct.DigitalFilter = 0;
+ I2C_InitStruct.OwnAddress1 = 0;
+ I2C_InitStruct.TypeAcknowledge = LL_I2C_ACK;
+ I2C_InitStruct.OwnAddrSize = LL_I2C_OWNADDRESS1_7BIT;
+ LL_I2C_Init(I2C1, &I2C_InitStruct);
+
+ LL_I2C_EnableAutoEndMode(I2C1);
+
+ LL_I2C_SetOwnAddress2(I2C1, 0, LL_I2C_OWNADDRESS2_NOMASK);
+
+ LL_I2C_DisableOwnAddress2(I2C1);
+
+ LL_I2C_DisableGeneralCall(I2C1);
+
+ LL_I2C_EnableClockStretching(I2C1);
+
+}
+
/* USART2 init function */
static void MX_USART2_UART_Init(void)
{
LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOC);
LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOF);
LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOA);
+ LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOB);
/**/
LL_GPIO_ResetOutputPin(LD2_GPIO_Port, LD2_Pin);
\r
<filestoremove>\r
<file>\r
- <name>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c</name>\r
- <name>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c</name>\r
- <name>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c</name>\r
- <name>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c</name>\r
- <name>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c</name>\r
- <name>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c</name>\r
- <name>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c</name>\r
- <name>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c</name>\r
</file>\r
</filestoremove>\r
\r
<include></include>\r
</Aincludes>\r
<Cincludes>\r
- <include>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/STM32F0xx_HAL_Driver/Inc</include>\r
- <include>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/CMSIS/Device/ST/STM32F0xx/Include</include>\r
- <include>/home/mj/STM32Cube/Repository/STM32Cube_FW_F0_V1.9.0/Drivers/CMSIS/Include</include>\r
</Cincludes>\r
</inctoremove>\r
\r
<file>\r
<name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c</name>\r
</file>\r
+ <file>\r
+ <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_i2c.c</name>\r
+ </file>\r
+ <file>\r
+ <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c</name>\r
+ </file>\r
<file>\r
<name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_pwr.c</name>\r
</file>\r
<file>\r
<name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c</name>\r
</file>\r
- <file>\r
- <name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c</name>\r
- </file>\r
<file>\r
<name>/aux/misc/stm/F0-package/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c</name>\r
</file>\r
File.Version=6
KeepUserPlacement=true
Mcu.Family=STM32F0
-Mcu.IP0=NVIC
-Mcu.IP1=RCC
-Mcu.IP2=SYS
-Mcu.IP3=USART2
-Mcu.IPNb=4
+Mcu.IP0=I2C1
+Mcu.IP1=NVIC
+Mcu.IP2=RCC
+Mcu.IP3=SYS
+Mcu.IP4=USART2
+Mcu.IPNb=5
Mcu.Name=STM32F030R8Tx
Mcu.Package=LQFP64
Mcu.Pin0=PC13
Mcu.Pin1=PC14-OSC32_IN
-Mcu.Pin10=VP_SYS_VS_Systick
+Mcu.Pin10=PB6
+Mcu.Pin11=PB7
+Mcu.Pin12=VP_SYS_VS_Systick
Mcu.Pin2=PC15-OSC32_OUT
Mcu.Pin3=PF0-OSC_IN
Mcu.Pin4=PF1-OSC_OUT
Mcu.Pin7=PA5
Mcu.Pin8=PA13
Mcu.Pin9=PA14
-Mcu.PinsNb=11
+Mcu.PinsNb=13
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F030R8Tx
PA5.GPIO_Speed=GPIO_SPEED_FREQ_LOW
PA5.Locked=true
PA5.Signal=GPIO_Output
+PB6.Mode=I2C
+PB6.Signal=I2C1_SCL
+PB7.Mode=I2C
+PB7.Signal=I2C1_SDA
PC13.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PC13.GPIO_Label=B1 [Blue PushButton]
PC13.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING
ProjectManager.TargetToolchain=Makefile
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
-ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-LL-true,2-SystemClock_Config-RCC-false-LL-false,3-MX_USART2_UART_Init-USART2-false-LL-true
+ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-LL-true,2-SystemClock_Config-RCC-false-LL-false,3-MX_USART2_UART_Init-USART2-false-LL-true,4-MX_I2C1_Init-I2C1-false-LL-true
RCC.AHBFreq_Value=32000000
RCC.APB1Freq_Value=32000000
RCC.APB1TimFreq_Value=32000000
RCC.FCLKCortexFreq_Value=32000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=32000000
-RCC.IPParameters=AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USART1Freq_Value
+RCC.I2C1Freq_Value=8000000
+RCC.IPParameters=AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,I2C1Freq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USART1Freq_Value
RCC.MCOFreq_Value=32000000
RCC.PLLCLKFreq_Value=32000000
RCC.PLLMCOFreq_Value=16000000
RCC.USART1Freq_Value=32000000
SH.GPXTI13.0=GPIO_EXTI13
SH.GPXTI13.ConfNb=1
-USART2.IPParameters=VirtualMode-Asynchronous
+USART2.BaudRate=115200
+USART2.IPParameters=VirtualMode-Asynchronous,BaudRate
USART2.VirtualMode-Asynchronous=VM_ASYNC
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick