8 years, 8 months ago.

FRDM-K64F- UART pins configured

Hi,

I am trying to communicate FRDM-K64 with a arduino shield having a BT chip over UART.

As per the schematics of the BT arduino shield I got ,the UART lines used are the pins D8 and D2.

The D8 and D2 pins on the host i.e. FRDM K64 are D8 = PTA0, D2 = PTB9.

When I read the data sheet of the " K64 Sub-Family Reference Manual" I see that PTA0 and PTB9 are not UART Tx and Rx but rather they can be multiplexed as a SPI or UART CTS/RTS or as FTM.

My question: Is it possible to use D8 and D2 for UART tx and rx ?

I tried as below but then the system did not boot at all

Serial bt_uart(D8,D2).

Could you please guide me what can be done in this case ?

When I used Serial bt_uart(D1,D0) the system boots since D1 and D0 are UART lines.

- yK

Hi Yogesh,

Can I ask what BT arduino shield you are using?

Thanks, Brian

posted by Brian Daniels 20 Aug 2015

BT arduino shield used is a proprietary from CSR. Its named H13174.

posted by yogesh kulkarni 21 Aug 2015

1 Answer

8 years, 8 months ago.

In order to use the Serial class to provide UART functionality on a pair of pins they need to support a physical UART and as you discovered the pins you are trying to used done so the Serial class will raise an error which causes the board to crash.

If you need to use those pin because of the BT board you are using then I would suggest that you try the SoftSerial class which can provide UART functionality on any digital pin.

Hope this helps.

tried Soft serial . Did not much help. The software kept hanging during Tx.

posted by yogesh kulkarni 24 Aug 2015