When I use SD4 in pins PINA1 and PINA0 with USART3 in pins PINB10 and PINB11, everything works fine, but when I add Serial Port 2 (with Serial Driver or USART driver) in pins PINA2 and PINA3, the code stops working, it prints by SD4 the first batch of data, but then stops or doesn't star at all. Without using usart2, the code works well.
Here is the initialization part for the pins:
Code: Select all
sdStart(&SD4, NULL);
palSetPadMode(GPIOA, 1, PAL_MODE_ALTERNATE(8));
palSetPadMode(GPIOA, 0, PAL_MODE_ALTERNATE(8));
uartStart(&UARTD3,&UARTpcfggps);
palSetPadMode(GPIOB, 10, PAL_MODE_ALTERNATE(7));
palSetPadMode(GPIOB, 11, PAL_MODE_ALTERNATE(7));
uartStart(&UARTD2,&UARTpcfgimu);
palSetPadMode(GPIOA, 2, PAL_MODE_ALTERNATE(7));
palSetPadMode(GPIOA, 3, PAL_MODE_ALTERNATE(7));
Only initializating usart2, the code stops working. I used both usarts some days ago so I know it works, but it seems the three serial devices at the same time have some problems.