Wireless UART implementation with MKW41Z

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Wireless UART implementation with MKW41Z

783件の閲覧回数
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. 

ラベル(2)
0 件の賞賛
返信
1 返信

661件の閲覧回数
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 件の賞賛
返信