LP-AM263P: Issues with mcspi_Performance_32bit example

Part Number: LP-AM263P
Other Parts Discussed in Thread: SYSCONFIG, AM263P4

Tool/software:

Hello,

I am trying to read data transmitted from both the mcspi_performance_8bit and mcspi_performance_32bit examples from the v9.02.00.56 of the AM263P SDK.

Unfortunately, it seems that I am not getting any data on the logic analyzer on the D0 pin (J6.55). I've made no modifications to the SW, but based on what is populated on the TX Buffer, it seems like I should be reading 0x0, 0x1, 0x2, 0x3, and 0x4.

1. Is the picture below the expected output? Based on the code, gMcspiTxBuffer is not filled with 0, so I am unsure why I keep getting 0.

2. Shouldn't the code be indexing "j" instead of "0" in the for loop below? I tried changing it to "j" as I thought the reason I am only seeing 0 is because the FIFO is populated with only the first element of the txBuffer (Which is 0) but it does not fix the issue.

 

    startTimeInUSec = ClockP_getTimeUsec();
    for(j = 0U; j < APP_MCSPI_TRANSFER_LOOPCOUNT; j++)
    {
        mcspi_low_latency_transfer_32bit(baseAddr, chNum,
                                   &gMcspiTxBuffer[0], dataLength, bufWidthShift);
    }

Best regards,

David Martinez

  • Hi David,

    Are you probing the correct pin? The SPI0 is used in the example: and pin C10 transmits data, and the transmitted data is looped back to C10 RX buffer. You can try TX and RX mode

    2. Shouldn't the code be indexing "j" instead of "0" in the for loop below? I tried changing it to "j" as I thought the reason I am only seeing 0 is because the FIFO is populated with only the first element of the txBuffer (Which is 0) but it does not fix the issue.

    Using "0" is ok. &gMcspiTxBuffer[0] is a pointer to gMcspiTxBuffer[0]. The for-loop transmits McspiTxBuffer[4:0] five times (.APP_MCSPI_TRANSFER_LOOPCOUNT)..

  • Hello QJ,

    I am using the default sysconfig settings for this project. Shown below is also what pins I have connected to my logic analyzer. I do not think this is an issue with having the wrong pin connected.

    SPI0_CLK: J1.7

    SPI0_D0 J6.55

    SPI0_D1: J6.54

    SPI0_CS0: J2.18


    Changing it to TX and RX also did not fix this. I can confirm that I have D0 TX Enable set to "TX Enabled"

  • Hi David,

    Just did a test on AM263P4 Control card, and get the expected output waveform:

    Project: mcspi_performance_32bit_am263px-cc_r5fss0-0_nortos_ti-arm-clang

    Output data: gMcspiTxBuffer[i] = 0x00, 0x01, 0x02, 0x03, ...

    Project: mcspi_performance_8bit_am263px-cc_r5fss0-0_nortos_ti-arm-clang

    Output data: gMcspiTxBuffer[i] = 0x00, 0x01, 0x02, 0x03, ...