2014-12-03 04:32 PM
I changed the pins in the UART_TwoBoards_ComPolling example for the Nucleo STM32L152RE board.
It did not work until i also changed the port. Is there a fixed connection between pin and port? How do I know which pin belongs to which port?#define USARTx_TX_PIN GPIO_PIN_6
#define USARTx_TX_GPIO_PORT GPIOB
#define USARTx_TX_PIN GPIO_PIN_9
#define USARTx_TX_GPIO_PORT GPIOA
2014-12-03 06:15 PM
How do I know which pin belongs to which port?
Well there's a data sheet that associates all the pins with all the peripherals, perhaps that would be a good place to start?http://www.st.com/web/en/catalog/mmc/SC1169/SS1295/LN962/PF259539
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00098321.pdf
2014-12-04 05:11 AM
Thanks for your anwer. I had already looked at that document.
Now that I have thought some more about it I figured out that the second letter of the pin name equals the port name. e.g. pin name PB6 means pin 6 and port B.