Skip to main content
DYann.1
Senior II
March 3, 2023
Solved

I would like to know how to configure RCC on my evaluation Board STM32L552E-EV.

I connect my I2C but when I connect an oscilloscope I have nothing on the clock signal. So probably I misconfigured my clock. Could you give me the information? Thanks in advance.

In this picture below I've a warning, do you know how to remove this warning please ?

0693W00000aI9LSQA0.pngThank you for your helps.

Regards

Yann DO

    This topic has been closed for replies.
    Foued_KH
    Foued_KHBest answer
    ST Employee
    March 6, 2023

    Hello @DYann.1​ ,

    For the clock configuration, you can manager your clock with the tab "Clock Configuration"

    0693W00000aIG9YQAW.pngYou have to choose your Source:

    • for the HSE source, please follow this step :

    0693W00000aIFp6QAG.pngIf you select the MCU selector, you will have all peripherals without default mode.

    Hope my answer helped you!

    Foued

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

    27 replies

    DYann.1
    DYann.1Author
    Senior II
    March 7, 2023

    Hi,

    All is correct after me. Do you have a working example for me to check the I2C communication ?

    Foued_KH
    ST Employee
    March 7, 2023

    You can refer to the I2C WIKI : Getting started with I2C - stm32mcu

    Also  you can refer to the CubeFW to find the I2C examples : STM32Cube\Repository\STM32Cube_FW_L5_V1.4.0\Projects\

    Foued

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    DYann.1
    DYann.1Author
    Senior II
    March 7, 2023

    Hi,

    I know what i's I2C and how does it work. Someting tells me this is the evaluation board clock configuration. The I2C clock is a derivative of the main clock, that why in my previous message I would like to test the function Delay.

    I'll see the example but after me it does not exist on this evaluation board, let me check this information.

    DYann.1
    DYann.1Author
    Senior II
    March 7, 2023

    That confirm my thoughts :

    0693W00000aIN1hQAG.png

    Karl Yamashita
    Principal
    March 9, 2023

    You can use this I2C example. It's the same STM32L5 family and not tied to a specific development board.

    0693W00000aIcOGQA0.png

    If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
    DYann.1
    DYann.1Author
    Senior II
    March 7, 2023

    I can locate the error inside the function

    0693W00000aINIiQAO.pngAnd the error is that this point

    0693W00000aINKsQAO.pngI don't know the signification of this error. Do you have any idea ?

    DYann.1
    DYann.1Author
    Senior II
    March 7, 2023

    It's very strange when I come back to the '.ioc' I have a error and I selected resolve the error automatically. Now I have this configuration :

    0693W00000aINGsQAO.pngNormally the value is 8 but now it's 16. So I cant try again.

    DYann.1
    DYann.1Author
    Senior II
    March 7, 2023

    I have a warning :

    0693W00000aINNhQAO.pngImplicit declaration what does it means ?

    But it's not very important, I can working. Now I have the clock on the SCL (just to have pull-up inside no pull-up).

    But I have always the same error

    Karl Yamashita
    Principal
    March 9, 2023

    Did you add the prototypes?

    If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
    DYann.1
    DYann.1Author
    Senior II
    March 9, 2023

    Yes I have developed prototypes but the error comes from SysTick as I sent you an email. How to configure the SysTick with my evaluation Board STM32L552E-EV ? Just to check if my board still works.

    DYann.1
    DYann.1Author
    Senior II
    March 7, 2023

    Hi,

    Sorry I have another error :

    0693W00000aINBmQAO.pngbuff[0] had to make a shift. But I have always the same error.

    Karl Yamashita
    Principal
    March 9, 2023

    Explain your error.

    And use the code snippet icon to add code instead of images. Makes it easier to copy code.

    0693W00000aIcMZQA0.png

    If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
    DYann.1
    DYann.1Author
    Senior II
    March 10, 2023

    Hi,

    As I say before I modify my code to check the SysTick function

    int main(void)
    {
     /* USER CODE BEGIN 1 */
     
     /* USER CODE END 1 */
     
     /* MCU Configuration--------------------------------------------------------*/
     
     /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
     HAL_Init();
     
     /* USER CODE BEGIN Init */
     
     /* USER CODE END Init */
     
     /* Configure the system clock */
     SystemClock_Config();
     
    /* Configure the peripherals common clocks */
     PeriphCommonClock_Config();
     
     /* USER CODE BEGIN SysInit */
     
     /* USER CODE END SysInit */
     
     /* Initialize all configured peripherals */
     MX_GPIO_Init();
     MX_I2C1_Init();
     MX_SAI1_Init();
     /* USER CODE BEGIN 2 */
     
     HAL_Delay(50);
     HAL_Delay(50);
     // SGTL5000_init();
     // set_volume(0);
     
     /* USER CODE END 2 */
     
     /* Infinite loop */
     /* USER CODE BEGIN WHILE */
     while (1)
     {
     /* USER CODE END WHILE */
     
     /* USER CODE BEGIN 3 */
     }
     /* USER CODE END 3 */
    }

    And inside my function Hal_Delay (50), I'm always stuck in this line

    __weak void HAL_Delay(uint32_t Delay)
    {
     uint32_t tickstart = HAL_GetTick();
     uint32_t wait = Delay;
     
     /* Add a period to guaranty minimum wait */
     if (wait < HAL_MAX_DELAY)
     {
     wait += (uint32_t)uwTickFreq;
     }
     
     while ((HAL_GetTick() - tickstart) < wait)
     {
     }
    }

    And inside this function, it never returns to the calling function

    __weak uint32_t HAL_GetTick(void)
    {
     return uwTick;
    }

     Do you know how to configure the SysTick of my evaluation board STM32L552E-EV ?