AnsweredAssumed Answered

MCUXpresso FRDM-K64F UART example questions

Question asked by dave408 on Mar 28, 2018
Latest reply on Mar 30, 2018 by Mark Butcher

I started to play with MCUXpresso earlier today and was trying to get two demos working on the FRDM-K64F.  I got them working, but I needed to make changes.  In doing so, I came up with a couple of questions.

 

  1. The polling demo uses PTB16 and PTB17 and UART3.  Why use those PORTB pins when they aren't accessible on the FRDM-K64F?  Or did I miss something?  I looked at the mbed pinout image, as well as the schematics, and it looks like PTB16 and PTB17 are used for OpenSDA.  Once I changed them to PORTC and enabled the right clock, the demo worked fine.
  2. The polling demo also has this code in BOARD_InitPins():

    SIM->SOPT5 = ((SIM->SOPT5 &
    (~(SIM_SOPT5_UART0TXSRC_MASK))) // Mask bits to zero which are setting
    | SIM_SOPT5_UART0TXSRC(SOPT5_UART0TXSRC_UART_TX) // UART 0 transmit data source select: UART0_TX pin
    );

    Why is that there if the demo is using UART3?
  3. And why would it use UART3 if PTB16 and PTB17 can only be assigned to UART0?
  4. Interestingly enough, the interrupt demo uses UART0 and PTB16 and PTB17, which are correct.  Except the same thing goes here, I don't understand why NXP would pick those PORTB pins when they aren't on the Arduino-compatible headers.

Outcomes