Wireless UART implementation with MKW41Z

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wireless UART implementation with MKW41Z

388 Views
deepak_kumar
Contributor II

Sir, i want to change the wireless uart program to wireless spi as i have to connect the NXP Board with a display with can be interfaced by SPI only. Kindly also guide me for the necessary changes to made. 

0 Kudos
1 Reply

266 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Deepak Kumar

This example set up UART inside BleApp_Init, you can find the following code:

void BleApp_Init(void)
{
    /* Initialize application support for drivers */
    BOARD_InitAdc();

    /* UI */
    SerialManager_Init();

    /* Register Serial Manager interface */
    Serial_InitInterface(&gAppSerMgrIf, APP_SERIAL_INTERFACE_TYPE, APP_SERIAL_INTERFACE_INSTANCE);

    Serial_SetBaudRate(gAppSerMgrIf, gUARTBaudRate115200_c);

    /* Install Controller Events Callback handler */
    Serial_SetRxCallBack(gAppSerMgrIf, Uart_RxCallBack, NULL);
}

If you check APP_SERIAL_INTERFACE_TYPE you will find it defined with gSerialMgrLpuart_c, so you need to change this with gSerialMgrSPIMaster_c, and when you call Serial_InitInterface, it will set the SPI interface.

You will need to change Uart_RxCallBack, Uart_TxCallBack, BleApp_ReceivedUartStream, BleApp_FlushUartStream, etc. which are application specific, all of them are located in app.c

Hope this information could help you.

Best Regards

Jorge Alcala

0 Kudos