Browse Source

Merge pull request #6936 from francois-berder/periph-uart

boards: wifire/clicker: Fix UART configuration
master
Martine Lenders 6 years ago committed by GitHub
parent
commit
472eeb0068
  1. 6
      boards/pic32-clicker/clicker.c
  2. 6
      boards/pic32-wifire/wifire.c

6
boards/pic32-clicker/clicker.c

@ -21,12 +21,8 @@ void board_init(void)
* Setup pin mux for UART3 this is the one connected
* to the mickroBUS
*/
U3RXREG = 0x2; /*connect pin RPF5 to UART3 RX*/
U3RXR = 0x2; /*connect pin RPF5 to UART3 RX*/
RPF4R = 0x1; /*connect pin RPF4 to UART3 TX*/
PORTFCLR = BIT5 | BIT4; /*set '0' on Porf F pins 4 and 5 */
TRISFCLR = BIT4; /*set PortF pin 4 for output */
TRISFSET = BIT5; /*set PortF pin 5 for input */
ODCFCLR = BIT5 | BIT4; /*set PortF pin 4 and 5 as not open-drain */
/* intialise UART used for debug (printf) */
#ifdef DEBUG_VIA_UART

6
boards/pic32-wifire/wifire.c

@ -22,12 +22,8 @@ void board_init(void)
* Setup pin mux for UART4 this is the one connected
* to the ftdi chip (usb<->uart)
*/
U4RXREG = 0xb; /* connect pin RPF2 to UART 4 RX */
U4RXR = 0xb; /* connect pin RPF2 to UART 4 RX */
RPF8R = 0x2; /* connect pin RPF8 to UART 4 TX */
PORTFCLR = BIT8 | BIT2; /* clear down port F pins 2 and 8 */
TRISFCLR = BIT2; /* set portf pin 2 as input */
TRISFSET = BIT8; /* set portf pin 8 as output */
ODCFCLR = BIT8 | BIT2; /* set portf pint 2 and 8 as not open-drain */
/* intialise UART used for debug (printf) */
#ifdef DEBUG_VIA_UART

Loading…
Cancel
Save