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.

AWRL6844EVM: Transfer of Ethernet over SPI A header

Part Number: AWRL6844EVM
Other Parts Discussed in Thread: AWRL6844

Tool/software:

We have configured SPI A and need to configure it as master on AWRL6844 EVM and are trying to communicate to AD3306(Slave) via SPI A header pins. When sending the data over SPI I don’t get any response during MCSPI_transfer and it hangs there.

Please find the setup and configuration details below:

  1. To use the SPI A header pins, I have switched ON S4.3 switch and S1.3 switch. Is this hardware configuration enough to use SPI A header instead of FTDI SPI USB?
  2. Also, can you help me identify which is pin number 1 on the J2 connector of SPI A Header of eval board, is it the left most pin or the right most one?
  3. Below is the configuration of MCSPI0. Can you please verify this configuration.
  • Hi Mitraj,

    To use the SPIA header, turning On S4.3 should be sufficient. While using the SPIA header with external device, are you connecting VCC3V3 and gnd too?

    The leftmost pin is gnd and the right one is 3V3. Rest of the signals are in sequential order as per the schematic.

    Thanks,
    Kundan

  • Thankyou for confirming the connections and switch configuration , but still i am facing the issue. It waits forever after sending MCSPI_transfer.

  • Also adding one additional detail. I have connected MOSI(Master)<->MOSI(Slave) and MISO(Master)<->MISO(Slave). Is this connection fine?
    Also in the code below we are setting low interrupt low but i think that is for FTDI SPI. For SPI A header do we need to do this or its not required? As i see in the loopback example there is no GPIO_pinWriteLow used. 
    Also which mode is more suitable to use here interrupt, polling or DMA?


        // Initialize the SPI transaction
        MCSPI_Transaction_init(&spiTransaction);
        spiTransaction.channel = gConfigMcspi0ChCfg[0].chNum;; // Assuming channel 0; adjust as needed
        spiTransaction.dataSize = 32; // Data size in bits (8 bits per byte)
        spiTransaction.count = nSize; // Total bytes to transfer
        spiTransaction.txBuf = (void *)pWriteData; // Pointer to the TX buffer
        spiTransaction.rxBuf = (void *)pReadData;  // Pointer to the RX buffer
        spiTransaction.csDisable = TRUE;           // Keep CS active between transfers if needed
        spiTransaction.args     = NULL;

        /* Switch the host interrupt GPIO to trigger the acqusition of the new SPI frame by the host */
         GPIO_pinWriteLow(gSPIHostIntrBaseAddrLed, gSPIHostIntrPinNumLed);

        // Perform the SPI transfer
        transferStatus = MCSPI_transfer(gMcspiHandle[CONFIG_MCSPI0], &spiTransaction);
       
        if(transferOK != 0)
        {
            CLI_write("[AWRL6844][ERROR] SPI Raw Data Transfer Failed\r\n");
        }

         GPIO_pinWriteHigh(gSPIHostIntrBaseAddrLed, gSPIHostIntrPinNumLed);
  • Hi Mitraj,

    Each pin of the master should be connected to same pin of slave. Meaning, MISO of master should be connected to MISO of slave and vice versa for MOSI.

    Please retry once after changing the connection and let us know if you are still facing the issue.

    Thanks,
    Kundan

  • Hello kundan,

    I have mentioned the same in my question above. I have connected mosi-mosi and miso-miso. So i guess connections are fine. But still I am facing the same issue.

    Can you please verify the configuration for MCSPI and let me know.

  • Hey Mitraj, 

    Could you share your MCSPI Channel Configuration settings as well? Your overall settings seem to be fine.

    Regards,

    Kristien

  • Hello Kristen, here is the channel configuration

  • Hey Mitraj,

    Your settings appear to be fine. Are you also properly formatting the SPI pWriteData buffer to be compliant with OA-SPI transactions? I would hook up a logic analyzer to the MOSI and MISO lines between the AWRL6844 and AD3306 and verify data is being sent out or not. If your sending control command transactions, you should get responses on the MISO line if the SPI transaction is formatted correctly.

    Regards,

    Kristien

  • Hello Kristien,

    The issue is resolved once I build it in Debug mode and it was sending out data and also receiving it back. But when in Release mode i see there is no data being updated in the tx buffer for the same software which is the reason it was stuck at MCSPI_Transfer. Do you know why this is happening?

  • Hello Kristien,

    The spi works fine in polling mode but not in DMA mode. Can you tell me the configuration for DMA mode