Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years ago.
3 x serial with Nucleo-F103RB
Hello, I try to use 3 serial port with the Nucleo F103RB:
Serial pc(PA_2,PA_3); USART2
Serial bt(PA_9, PA_10); USART1
Serial osd(PB_10, PB_11); USART3 - Problem!
The ports are defined for serial use (see https://developer.mbed.org/platforms/ST-Nucleo-F103RB/). It works fine if I use only the first 2 serials. If I add the third one, the program does not start. After reset it send a message "pinmap not found for peripheral". What is wrong? I've also tried the alternative pins for the usart3, the same result.
Best Regards , Markus
Edit:
3 Serial s are defined for the Nuleo Board in PeripheralPins.c:
* SERIAL *
const PinMap PinMap_UART_TX[] = { {PA_2, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, 0)},
{PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, 0)},
{PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, 3)}, GPIO_Remap_USART1
{PB_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, 0)},
{PC_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, 5)}, GPIO_PartialRemap_USART3
{NC, NC, 0} };
const PinMap PinMap_UART_RX[] = { {PA_3, UART_2, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, 0)},
{PA_10, UART_1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, 0)},
{PB_7, UART_1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, 3)}, GPIO_Remap_USART1
{PB_11, UART_3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, 0)},
{PC_11, UART_3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, 5)}, GPIO_PartialRemap_USART3
{NC, NC, 0}
};
Question relating to:
1 Answer
8 years ago.
Hello Markus,
According to the User Manual, Chapter 6.8 - USART communication, USART3 is connected to PC_10 (Serial3TX) and PC_11 (Serial3RX).
The following code forks fine with my NUCLEO-F103RB. No "pinmap not found for peripheral" error is reported after reset. The terminal program running on my PC displays just the coming "Tick" messages:
#include "mbed.h" DigitalOut myled(LED1); Serial bt(PA_9, PA_10); Serial pc(PA_2, PA_3); Serial osd(PC_10, PC_11); int main() { while(1) { myled = 1; // LED is ON wait(0.2); // 200 ms myled = 0; // LED is OFF wait(1.0); // 1 sec pc.printf("Tick\r\n"); } }
Hello Zoltan, thank you for the fast response. PC10 and 11 was my first try (I forgot to mention it - sorry) with the same result. To be sure I've testet it again.
Serial pc(PA_2,PA_3); USART2
Serial bt(PA_9, PA_10); USART1
Serial osd(PB_10, PB_11); USART3 - Problem!
Serial osd(PC_10, PC_11); USART3 - Problem, other pins does not change the result.
Still "pinmap not found for peripheral".
posted by 17 Apr 2016