AnsweredAssumed Answered

Initialize Uart ports on FRDM-Kl43Z

Question asked by Emile Laplante on Jun 8, 2016
Latest reply on Jun 9, 2016 by Angus Galloway



I would like to initialize and exchange data over a Uart port on the board FRDM-KL43Z. Currently, I'm able to initialize receive and send data to a virtual terminal (tera term) using these functions:


lpuart_status_t LPUART_DRV_Init(uint32_t instance, lpuart_state_t * lpuartStatePtr,

                                const lpuart_user_config_t * lpuartUserConfig);


lpuart_status_t LPUART_DRV_SendData(uint32_t instance,


                                    const uint8_t * txBuff,

                                    uint32_t txSize);


lpuart_status_t LPUART_DRV_ReceiveData(uint32_t instance,


                                       uint8_t * rxBuff,

                                       uint32_t rxSize);


Currently, for the Uart instance parameter in these functions, I use the BOARD_DEBUG_UART_INSTANCE macro. But, I would like to use another Uart port on the FRDM KL43Z than the one connected to the openSDA. I didn't find any documentation mapping the different Uart port on arduino headers to instances in the code. In other words, for example, what should I put for the uint32_t instance parameter in the functions above to initialize the PTE20 and PTE21 port on the board (Or any other Uart port)?


Thank you