Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
4 posts • Page 1 of 1
I just had to do the same thing but on USART3. The following worked for me:
If you do not explicitly set the gpio mode it does not work, I am guessing this is normally done somewhere in Serial3.begin() but that function wont know about the remapping.
Code: Select all
// remap USART3 afio_remap(AFIO_REMAP_USART3_PARTIAL); gpio_set_mode(GPIOC, 10, GPIO_AF_OUTPUT_PP); gpio_set_mode(GPIOC, 11, GPIO_INPUT_FLOATING); gpio_set_mode(GPIOC, 12, GPIO_AF_OUTPUT_PP);