We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear All,
I am currently trying to get the (complete) remapping of the 4 output channels in TIM3. I have been trying to do this using the ST function eg.
GPIO_PinRemapConfig( GPIO_FullRemap_TIM3, ENABLE );
and the more "standard" way by writing to the register directly eg.
AFIO->MAPR |= 0x00000C00;
Interestingly enough both methods are working in the simulator, but do not seem to have any effect on the board, as on the board, the AFIO MAPR register allways seems to stay 0x00000000.
Thanks for any hints what I might be doing wrong! Tim
Hello Tim Moser,
you must enable clock for AFIO register. Please see chapter 4.3.7 APB2 Peripheral Clock enable register (RCC_APB2ENR) in STM32 Reference Manual.
Best Regards, Martin Guenther
Does the clock have to be enabled for any Alternate Function or just remapped Alternative Function? Reference manual implies all Alternative Functions, but some STM32 Firmware Library Examples ( eg SPI )never enable this clock others do.
Chris