Question
USE_FULL_ASSERT macro does not give warning
Posted on May 26, 2014 at 15:55
Hi,
I have had an error in my program and was wondering why the assertion macro did not give a warning for the second line, the first line is correct: RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE); The reason seems to be that the value of RCC_APB1Periph_TIM2 is 0x00000001 which is also the valid value of RCC_APB2Periph_TIM1 which would be OK for APB2, so no error is reported. What is the sense of assert_failed if such easy detectable error aren't recognized? Could the macro be extended to detect errors like these?