-
Notifications
You must be signed in to change notification settings - Fork 1k
Full Alternate function management for F1 series #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I gave this a try on the DISCO_F100RB, no difference, Serial.print() works fine but Serial.available() never gets any data. I went into debug. Again it seems to enter USART2_IRQHandler for output but never for input. This works now thanks to your pin map changes, thanks! One thing I did notice is that the DISCO_F100RB is using the HSI. This board has both an 8MHz HSE and a 32K xtal. I put a scope on the pin and we are back to the situation where the TX pin works and the RX pin doesn't work. In addition, the pin signal level it low instead of high. I think the problem is that the RX pin isn't being set to input. I used the debugger to stop in uart_init
I let the debugger continue and it magically started working. I think Line 216 in uart_init.c should be setting Mode to 0
However, It is getting set to 2 To fix this, I went into PeripheralPins.c and made PA_3 an input
That works. So the pinmap_gen thing needs to do the right thing for all RX pins. Thanks for looking into this problem! |
Hum interesting. See the Mbed one for Nucleo-F103RB: |
Signed-off-by: Frederic Pillon <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
For F1, AF implies to configure as INPUT. For Other series, AF is a specific GPIO config which handle Input or Output depending of the AF selected. |
Signed-off-by: Frederic Pillon <[email protected]>
This add all AFIO REMAP for STM32 F1 series