Reply
Posts: 14
Registered: ‎09-13-2017

Unable to configure USART1 to certain pins on EFR32MG12

I'm trying to get a UART using USART1 mapped to pins 4 and 6 (TX, RX resp) on the EFR32MG12 break out. 

 

 

#define MY_UART \
{ \
USART1, \
57600, \
_USART_ROUTELOC0_TXLOC_LOC4, \
_USART_ROUTELOC0_RXLOC_LOC6, \
usartStopbits1, \
usartNoParity, \
usartOVS16, \
false, \
uartdrvFlowControlNone, \
gpioPortA, \
4, \
gpioPortA, \
5, \
(UARTDRV_Buffer_FifoQueue_t *)&rxBufferQueue, \
(UARTDRV_Buffer_FifoQueue_t *)&txBufferQueue, \
_USART_ROUTELOC1_CTSLOC_LOC0, \
_USART_ROUTELOC1_RTSLOC_LOC0 \
}

UARTDRV_InitUart_t initData = MY_UART;
UARTDRV_InitUart(handle, &initData);

I'm trying to edit the example code given at : https://devtools.silabs.com/dl/documentation/doxygen/5.3.2/efr32mg12/html/group__UARTDRV.html

I'm having a hard time getting the configuration to work correctly. Is it possible to use USART1 as a standard UART on the breakout pins while also having USART0 be the default console output for the device? Any ideas on configuring them both to work simultaneously?

Highlighted
Posts: 241
Registered: ‎07-27-2016

Re: Unable to configure USART1 to certain pins on EFR32MG12

Hi @brengera,

 

Try it with the TX and RX pins in the same location. I don't think they it will work if the TX pin is in loc 4 and RX is in loc6. 

 

Best,

 

Manasa