![NXP Semiconductors LPC84x Скачать руководство пользователя страница 128](http://html.mh-extra.com/html/nxp-semiconductors/lpc84x/lpc84x_user-manual_1721742128.webp)
UM11029
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2017. All rights reserved.
User manual
Rev. 1.0 — 16 June 2017
128 of 515
NXP Semiconductors
UM11029
Chapter 10: LPC84x Switch matrix (SWM)
10.3.2 Enable an analog input or other special function
The switch matrix enables functions that can only be assigned to one pin. Examples are
analog inputs, all GPIO pins, and the debug SWD pins.
•
If you want to assign a GPIO pin to a pin on any LPC84x package, disable any special
function available on this pin in the PINENABLE0 or PINENABLE 1 register and do
not assign any movable function to it.
By default, all pins except pins PIO0_2, PIO0_3, PIO0_5, PIO1_8, and PIO1_9 are
assigned to GPIO. By default, PIO0_2 and PIO0_3 are configured by FAIM.
•
For all other functions that are not in the table of movable functions, do the following:
a. Locate the function in the pin description table in the data sheet. This shows the
package pin for this function.
b. Enable the function in the PINENABLE0 PINENABLE1 register. All other possible
functions on this pins are now disabled.
10.3.3 Changing the pin function assignment
Pin function assignments can be changed “on-the-fly” from one peripheral to another
while the part is running. To disconnect a peripheral from the pins and change the pin
function assignment, follow these steps:
1. Enable the clock to the switch matrix.
2. Find the pin assign register for the current pin function. For example, register
PINASSIGN0 for pin function U0_RXD.
3. Set the corresponding bits in the PINASSIGN register to their default value 0xFF.
4. Clear all pending interrupts for the disconnected peripheral and ensure that the
peripheral is in a defined state.
5. In the pin assign register for the new pin function, program the pin number.
6. Disable the clock to the switch matrix.