Use Cases#

This section describes use cases that can be demonstrated with current implementation of the component.

Transmit from CCPLEX side and receive at FSI#

  1. Configure a channel in dt as shown in section “Add channel for NvFsiCom”. We have configured a demo channel_3 channel of below configuration:

    frame-count = <4>;
    frame-size = <64>;
    core-id = <0>;
    
  2. Configure an NvSci channel in DT as shown in the “Add channel for NvFsiCom” section. We have configured a demo channel_3 channel below.

  3. Configure the same channel on the FSI side. Refer to the “Add channel in CddCcplexCom” section.

  4. Read channel info from DT. Use the NvFsiComGetNodeInfo() API.

  5. Register and initialize the channel with NvFsiCom daemon. Use NvFsiComInit() API.

  6. Use NvFsiComWrite() to send data to FSI.

  7. Refer to DemoAppCom.c sample usage of above APIs where data is sent on channel channel_3.

  8. Refer to SWC_Rx_Indication() in DemoApp.c on FSI for sample code to receive data.

Transmit from FSI side and receive at CCPLEX#

  1. Repeat steps 1 and 2 in Sec 5.1.

  2. NvFsiComWaitForEvent() is an API to get notification for incoming data on CCPLEX. API is called in DemoAppCom.c to receive the notification for data reception.

  3. Call NvFsiComRead() to read data on CCPLEX. API is called in DemoAppCom.c to read the data.

  4. LdCom_Transmit can be called from SWC on FSI to transmit the data. It is demonstrated in DemoApp.c on FSI.

Transmit From FSI and Receive at CCPLEX in Multiple Thread of a Process#

A process on CCPLEX can receive messages from FSI in different threads. Group channels into multiple Group Ids. Each group can have one or more FSI-CCPLEX-COM channels. Each group can receive messages parallel in different threads. Use NvFsiComGrp* APIs.

DemoAppComMultiThread is a sample implementation to demonstrate this functionality. Channels within a group can receive messages sequentially only. For all channels to receive messages in parallel, user will need to configure each group with single channel.

  1. Repeat steps 1 and 2 in Sec 5.1

  2. Add a channel group as shown below:

    FsiComApp_grp1{
        compatible = "nvidia,tegra-fsicom-grp1";
        group_id = <1>;  /* Channels which are grouped can receive message in one thread */
        nChannels = <2>; /* Number of channels in group */
        channelid_list = <2 1>; /* Channel 2 and Channel 1 are grouped */
    }
    
  3. Refer DemoAppMultiThread implementation to use NvFsiComGrp* API

  4. Code on FSI side remains same.

Transmit from CCPLEX and Receive Messages on FSI by Polling#

This use case is supported for all FSI cores. Update channel configuration as mentioned below to enable polling support for a channel:

On FSI Side#

  1. Set “Multi Core Support” to True in FsiCom configuration in BSW configurator.

  2. Set “Supports Notification” to false for the channel for which polling has to be used in FsiCom channel configuration in BSW configurator.

  3. PDU and LdCom are supported only for channels which use notifications. For polling based channel, user SWC on FSI needs to connect to If_CS_CddCcplexComPolling client server port (user RTE interface to read and write).

Note

Known limitation: “FSI to DBB isolation” in LIS needs to be disabled for polling to work.

On CCPLEX Side#

Configuration update for “FsiComQnxIvc” Node:

  1. Add polling core configuration:

    fsi_core_polling=<2 3>; /* Mention cores on which polling support is needed */
    
  2. Set channel property:

    notification = "disabled"; /* To disable interrupts for the channel */
    

Note

Refer to channel_10 or channel_11 in Configuration section for example configuration.