Skip to main content
TARHAN SAMAH
Senior
July 30, 2018
Solved

RCC_CSR resgister libary not found on my cube generated project stm32f103cb

  • July 30, 2018
  • 2 replies
  • 702 views

hello i try to read registers RCC_CSR with FlagStatusRCC_GetFlagStatus (uint8_t RCC_FLAG)

but my project generated by cubemx doesnt recognize this function ,

is there an option i didnt open on cube mx , or should i download a folder ,

because i couşdn find

STM32F10x Standard Peripherals Library 3.5.0 on my project

thanks

    This topic has been closed for replies.
    Best answer by TARHAN SAMAH

    thanks ,,

    i got my registers :)

    if(__HAL_RCC_GET_FLAG(RCC_FLAG_SFTRST))

    {

    //printf("\r\n software reset");

    }

    else if(__HAL_RCC_GET_FLAG(RCC_FLAG_PORRST))

    {

    //printf("\r\n power reset");

    lcd_init();

    }

    else if(__HAL_RCC_GET_FLAG(RCC_FLAG_PINRST))

    {

      //printf("\r\n pin reset");

    }

    else { /*printf("\r\n unknown reset ");*/  }

    //// The flags must be cleared manually after use

    __HAL_RCC_CLEAR_RESET_FLAGS();

    it works good

    2 replies

    Amel NASRI
    ST Technical Moderator
    August 3, 2018

    Hi @TARHAN SAMAH​ ,

    Standard Peripheral Library isn't supported by CubeMX; It is a different development approach than the Cube.

    So, you cannot use it with CubeMX or merge code based on SPL and Cube on the same project.

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    TARHAN SAMAH
    TARHAN SAMAHAuthorBest answer
    Senior
    August 7, 2018

    thanks ,,

    i got my registers :)

    if(__HAL_RCC_GET_FLAG(RCC_FLAG_SFTRST))

    {

    //printf("\r\n software reset");

    }

    else if(__HAL_RCC_GET_FLAG(RCC_FLAG_PORRST))

    {

    //printf("\r\n power reset");

    lcd_init();

    }

    else if(__HAL_RCC_GET_FLAG(RCC_FLAG_PINRST))

    {

      //printf("\r\n pin reset");

    }

    else { /*printf("\r\n unknown reset ");*/  }

    //// The flags must be cleared manually after use

    __HAL_RCC_CLEAR_RESET_FLAGS();

    it works good