Question
About the timer capture register.
If you read the capture register like this
uint16_t capch;
capch=*((uint16_t*)&TIM2_CCR3H);This code will be compiled into an ldw instruction.The data is read incorrectly.
The following code gives the correct result.
uint16_t capch;
((uint8_t *)&capch)[0]=TIM2_CCR3H;
((uint8_t *)&capch)[1]=TIM2_CCR3L;This means that the CCR has a shadow buffer register.
Could you tell me please, in what document about this said, thank you
