working on I2C for LED driver on Daisy Patch
@@ -159,7 +159,7 @@ void SystemClock_Config(void)
|RCC_PERIPHCLK_SAI1|RCC_PERIPHCLK_SDMMC
|RCC_PERIPHCLK_I2C2|RCC_PERIPHCLK_ADC
|RCC_PERIPHCLK_USB|RCC_PERIPHCLK_QSPI
- |RCC_PERIPHCLK_FMC;
+ |RCC_PERIPHCLK_FMC | RCC_PERIPHCLK_I2C4;
PeriphClkInitStruct.PLL2.PLL2M = 4;
PeriphClkInitStruct.PLL2.PLL2N = 100;
PeriphClkInitStruct.PLL2.PLL2P = 2;
@@ -172,7 +172,7 @@ void SystemClock_Config(void)
PeriphClkInitStruct.PLL3.PLL3N = 295;
PeriphClkInitStruct.PLL3.PLL3P = 64;
PeriphClkInitStruct.PLL3.PLL3Q = 4;
- PeriphClkInitStruct.PLL3.PLL3R = 2;
+ PeriphClkInitStruct.PLL3.PLL3R = 4;
PeriphClkInitStruct.PLL3.PLL3RGE = RCC_PLL3VCIRANGE_1;
PeriphClkInitStruct.PLL3.PLL3VCOSEL = RCC_PLL3VCOWIDE;
PeriphClkInitStruct.PLL3.PLL3FRACN = 0;
@@ -186,6 +186,8 @@ void SystemClock_Config(void)
PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1;
PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2;
PeriphClkInitStruct.I2c123ClockSelection = RCC_I2C123CLKSOURCE_PLL3;
+ PeriphClkInitStruct.I2c4ClockSelection = RCC_I2C4CLKSOURCE_PLL3;
+ //PeriphClkInitStruct.I2c4ClockSelection = RCC_I2C4CLKSOURCE_D3PCLK1;
PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
PeriphClkInitStruct.AdcClockSelection = RCC_ADCCLKSOURCE_PLL3;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
