SPRUJ53B April 2024 – September 2024 TMS320F28P550SJ , TMS320F28P559SJ-Q1
FILE: fsi_ex8_ext_p2pconnection_rx.c
Example sets up FSI receiving device in a point to point connection to the FSI transmitting device. Example code to set up FSI transmit device is implemented in a separate file.
In a real scenario two separate devices may power up in arbitrary order and there is a need to establish a clean communication link which ensures that receiver side is flushed to properly interpret the start of a new valid frame.
There is no true concept of a main or a remote node in the FSI protocol, but to simplify the data flow and connection we can consider transmitting device as main and receiving side as remote. Transmitting side will be driver of initialization sequence.
Handshake mechanism which must take place before actual data transmission can be usecase specific; points described below can be taken as an example on how to implement the handshake from receiving side -
Now, the receiver side has received the acknowledged PING frame(tag1), so it is ready for normal operation further.
After above synchronization steps, FSI Rx can be configured as per usecase i.e. nWords, lane width, enabling events etc and start the infinite transfers. More details on establishing the communication link can be found in device TRM.
User can edit some of configuration parameters as per usecase, similar to other examples.
nWords - Number of words per transfer may be from 1 -16 nLanes - Choice to select single or double lane for frame transfers fsiClock - FSI Clock used for transfers txUserData - User data to be sent with Data frame txDataFrameTag - Frame tag used for Data transfers txPingFrameTag - Frame tag used for Ping transfers txPingTimeRefCntr - Tx Ping timer reference counter rxWdTimeoutRefCntr - Rx Watchdog timeout reference counter
External Connections
For FSI external P2P connection, external connections are required to be made between two devices. Device 1's FSI TX and RX pins need to be connected to device 2's FSI RX and TX pins respectively. See below for external connections to make and GPIOs used:
External connections required between independent RX and TX devices:
ControlCard FSI Header GPIOs:
Watch Variables