This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-AM263: FSI example stuck within Semaphore while RX is awaiting variables

Part Number: LP-AM263
Other Parts Discussed in Thread: TMDSFSIADAPEVM

Hello, I am currently working on a project where I am trying to use FSI to stream variables between an F28388D CC to a LP-AM263x. For reference I have been using the fsi_loopback_interrupt example provided within the SDK file and disabled the Internal Loopback to allow for user data to be received from the F28388D. 

As of now I have yet to be able to transfer any data to the LP-AM263x due to the code getting stuck in a infinite loop within a Semaphore as seen below. 

Any help would be great :)

  • Hi AJ,

    Please use the fsi_loopback_interrupt_am263x-cc_r5fss0-0_nortos_ti-arm-clang from the MCU+ SDK 08.06.00.34

    First of all, you will need to comment out the following lines:

        ///status = FSI_enableRxInternalLoopback(rxBaseAddr);

        ///DebugP_assert(status == SystemP_SUCCESS);

    Then you will need to comment out the following lines:

    ///status = FSI_setTxBufferPtr(txBaseAddr, bufIdx);
    ///status += FSI_writeTxBuffer(txBaseAddr, gTxBufData, dataSize, bufIdx);
    ///status += FSI_startTxTransmit(txBaseAddr);
    ///DebugP_assert(status == SystemP_SUCCESS);

    /* Wait for TX and RX completion */
    ///SemaphoreP_pend(&gFsiTxSemObject, SystemP_WAIT_FOREVER);

    Then send data from F28388D, once the data reaches the AM263x, then SemaphoreP_pend(&gFsiRxSemObject, SystemP_WAIT_FOREVER); will return.

    FSI_readRxBuffer(rxBaseAddr, gRxBufData, dataSize, bufIdx); will read the RX data.

    Best regards,

    Ming

  • Hello MIng,

    Unfortunately this did not resolve my issue. I commented out the respective lines and sent data from the F28388D, however the SemaphoreP_pend(&gFsiRxSemObject, SystemP_WAIT_FOREVER); still did not return

  • Hi AJ,

    The MCU+ SDK FSI example are all using the single lane (FSI_APP_N_LANES), so if you are sending data from F28388D using 2 lanes, then you will need to change the FSI_APP_N_LANES to 01

    Best regards,

    Ming

  • Hi Ming, 

    Both the F28388D and the LP-AM263 are using a single lane and had already been configured this way previously. 

  • Hi AJ,

    Can you explain in detail how do you connect the F28388D and the LP-AM263?

    Are you run the program in AM263x LP first, then you run the F28388D later?

    Can you capture the FSI RXCLK, RXD0 during the data transmission from F28388D.

    Best regards,

    Ming

  • Hi Ming,

    I am connecting the two devices by using two TMDSFSIADAPEVM FSI adapter boards connected to each device, and connected to one another via ethercat.

    Yes I am running the AM263x first and then running the F28388D after 

    Yes I can seen below is a capture of the RX data on the AM263x and the TX data from the F28388D

    Thank you,

    AJ 

  • Hi AJ,

    Why TX_D0 and RX_D0 are different? Should they be the same?

    Best regards,

    Ming

  • Hi Ming,

    Yes TX_D0 and RX_D0 should be the same, I believe the small differences between the two are due to excess noise within the system. 

    Thank you, 

    AJ

  • Hi AJ,

    The other thing you may need to check is the following:

    1. Please refer to the section 7.4.8.4.1 Establishing the Communication Link of the AM263x TRM for your connect between the AM263x and the F28388D.

    2. Make sure the main device (AM263x or F28388D) is doing what is described in 7.4.8.4.1.1 Establishing the Communication Link from the Main Device

    3. And remote device (F28388D or AM263x) is doing what is described in 7.4.8.4.1.2 Establishing the Communication Link from the Remote Device

    Best regards,

    Ming

  • Hi Ming, 

    I have gone through these sections of the AM263x TRM and made sure both devices are doing what is described in these sections

    Thank you,

    AJ

  • Hi AJ,

    Did you connect the GND of F28388D CC to the GND of a AM263x CC or LP?

    Best regards,

    Ming

  • Hi Ming, 

    I believe this is already done via the ethercat connection. However I went ahead and connected the two GND pins together and ran the code to no avail. 

    Thank you, 

    AJ

  • Hi AJ,

    What do you mean " However I went ahead and connected the two GND pins together and ran the code to no avail.". It works or not?

    Best regards,

    Ming

  • Hi Ming,

    Sorry, this did not work. I am not sure why it states that this solved my issue. 

    Thank you,

    AJ

  • Hi AJ,

    The only other thing I can think of is the other events may happen during the AM263x RX. Please check the FSI_RXn_RX_EVT_STS_ALT1_ Register (0x50290014) for any other possible events after F28388D sent the data.

    Best regards,

    Ming

  • Register 0x50290014 is set to 80 before the data is sent and then remains at 80 after the data is sent. However, I am using Rx1 to receive the data and looking at FSI_RX1_RX_EVT_STS_ALT1_  (Register 0x50291014) it is set to 00000000 before the data is sent and then changes to 39390C70 after the data has been sent 

  • Hi AJ,

    Did you get the RX interrupt when you use the RX1 to receive data?

    According to the AM263x LP user guide, the TX1/RX1 were set for sending/receiving data on AM263x side instead of the TX0/RX0. That is why you never get anything on RX0.

    Best regards,

    Ming