Forcing EFR32 serial communications through WSTK expansion header

by <a href=""><font color="#000000"><font size="2">Hero Employee</font></font> </a> RonB on ‎03-16-2017 05:30 PM

When building the sample applications or xNCP images for the EFR32 on the WSTK, UART0 can be routed to the USB mini-B connector (located between the Ethernet port and the battery socket) or the 20 pin expansion header on the opposite end of the board.  By default the board controller will pick which ever interface is enabled first.  This can be problematic when trying to use the expansion header while powering the WSTK via a PC or certain smart charger which energize the D+/D- lines.


You can force the WSTK to route UART0 serial through the expansion header by making PA5 and output and setting the value high.   As a shortcut, this can be done with a define statement in any of you files, like your board header:


This define will call a function halEnableVCOM(), which will enable this port for you.  Saving you the need to explicitly enable PA5 as an output and set it high.