12345 67890

LPC845-BRK example ADC: Mex-file differs from code

Discussion created by 12345 67890 on Apr 24, 2019
Latest reply on Apr 25, 2019 by Kerry Zhou

Well, I just started to explore the ADC example of  https://www.nxp.com/downloads/en/software/LPC845BRK_Examples.zip (LPC845_ADC_LDR).

The function BOARD_InitPins() in pin_mux.c contains:

As you can see in the last 2 lines, USART0_TXD and USART0_RXD are configured.

Why line 1, 2 and 4 are here? Are they to trigger a conversion? Then this information is missed in the introductory description of the application (but I may be wrong because I'm very tired today).

When I switch to the Pins tool and the mex-file is loaded, this pin_mux.c differs. Here the USART0 e.g. is not configured:

And why ADC_CHN0 is configured? I think it's fixed to the potentiometer.