2018-07-30 07:16 AM
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
Solved! Go to Solution.
2018-08-07 04:17 AM
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
2018-08-03 06:56 AM
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 Accept as Solution on the reply which solved your issue or answered your question.
2018-08-07 04:17 AM
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