Skip to content

Commit

Permalink
Merge pull request #464 from bikeNomad/bikenomad-fix-tim2_pwm_remap-e…
Browse files Browse the repository at this point in the history
…xample

examples/tim2_pwm_remap: fix logic error in timer remapping.
  • Loading branch information
cnlohr authored Dec 2, 2024
2 parents 2c7e8b2 + d916c8f commit 3fc6786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/tim2_pwm_remap/tim2_pwm_remap.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void t2pwm_setpw(uint8_t chl, uint16_t width)
*****************************************************************************************/
void ToggleRemap(void) {
if(AFIO->PCFR1 & AFIO_PCFR1_TIM2_REMAP_FULLREMAP) {
AFIO->PCFR1 &= AFIO_PCFR1_TIM2_REMAP_NOREMAP; //clear remapping bits
AFIO->PCFR1 &= ~AFIO_PCFR1_TIM2_REMAP_FULLREMAP; //clear remapping bits
printf("Standard Mapping!\r\n");
}
else {
Expand Down

0 comments on commit 3fc6786

Please sign in to comment.