I am trying to use ADC0_SE8 and ADC1_SE8 as adc inputs,and they are mapped to PTB0 and LLWU_P5 .How could I multiplex these signals to,for example,PTD12 and PTD13 ?
different pins have a set list of possible alternative functions that you can mux it to. If a function is not apart of the possible pin assignments, then you can't use that function on that particular pin.
if you look in K66's signal multiplexing and pin assignments table found in the reference manual or datasheet, you'll see that specifically PTD12 and PTD13 aren't able to serve as ADC0_SE8 or ADC1_SE8 in any of the multiplexing alternative function possibilities.
However, as you noted in your post, PTB0 and PTB1 by default serve as ADC0_SE8 or ADC1_SE8. You may consider just using PTB0 and PTB1 instead of PTD12 and PTD13.
Also, to change the functionality of a pin all you need to do is look in the PORTx_PCRn register and write appropriately to the [MUX] field.
Retrieving data ...