Knowledge base/Frequently Asked Questions/EFM32 FAQ

Moving/Rerouting peripheral pin connections

Rasmus Larsen
posted this on May 24, 2010 21:20

Q: 

Is it possible to move or reconfigure which pins the USARTs are connected to?

A:

Yes, all peripherals which have digital connections to pins have got a ROUTE register. This register contains one "pin enable" bit for each pin connection. The USARTs for instance, contains TXPEN, RXPEN, CSPEN and CLKPEN, to control the pin connections. When the pin enable bit is set the USART controls the direction and the data output to the pins, overriding the settings in the GPIO. When the pin enable bit is 0, the USART does not influence the pin at all, and the settings and data are configured solely by the GPIO. With the xxPEN bits, you can then chose to use only the TX and RX pins for USART communication, while using the pins normally connected to CS and CLK as normal GPIOs.

Note that unused LCD segments lines also can be disabled by the LCD_SEGEN register, but here the lines are controlled in groups of 4.

The ROUTE register also contains a LOCATION field, which can be set to 4 different values. When changing this value, you move all the pin connections for the peripheral to the alternate location with the same value. Pins which are not enabled are also moved, but still will not be influencing the pins in the new location. You can find which pins these values correspond to in the datasheet for the specific device, in table 4.1. The alternate location number is denoted by "#". Note that depending on device, not all peripherals have as much as 4 different locations, so check the datasheet before configuring this.

The energyAware Designer is a free tool that can be used to set up and visualize the pin map and clock configuration for all EFM32 devices. The tool also generates C-code to configure the EFM32 according to the desired setup.

The energyAware Designer is available as a package in Simplicity Studio.

 
Topic is closed for comments