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.

TMS570LC4357: The chip select and the transmit and receive function mibspiSetData issue

Part Number: TMS570LC4357


Hi team,

Here's an issue from the customer may need your help:

1) During configuration, does the following figure indicate that 16-bit data needs to be sent? If 8 words are not satisfied, then they are automatically zeros? 

2) Regarding the chip select, does the chip select automatically pull high when MibspiSetData() is executed?

Because the customer wants to exchange data with the external flash, and after the customer sends the command to the host, does the MibspiGetData() function automatically pull the chip select high during execution? 

uint16_t data[3]={0};
uint16_t command[1]={0x9F};
uint8_t ID1,ID2,ID3;
uint32_t ID;


//mibspiReset(mibspiREG4);
mibspiSetData(mibspiREG4,0,command);

mibspiTransfer(mibspiREG4,0);


while(mibspiIsTransferComplete(mibspiREG4,0)==1){
mibspiGetData(mibspiREG4,0,data);

ID1=data[0];

mibspiGetData(mibspiREG4,1,data);
ID2=data[1];

mibspiGetData(mibspiREG4,1,data);
ID3=data[2];

ID=(ID1<<16)|(ID2<<8)|(ID3);
}

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    I am working on your issue now and you will get response soon.

    --
    Thanks,
    Jagadish.

  • Hi Cherry,

    1A) During configuration, does the following figure indicate that 16-bit data needs to be sent?

    Ans) No, if charlen(character length) is 8bit means 8 data bits will be transmitted. That means when we write data into SPIDATA register then lower 8 bits of 16bit TXDATA will be shifted on MO pin.

    1B)If 8 words are not satisfied, then they are automatically zeros? 

    Ans) This configuration related to Multi buffers, The MibSPI has a programmable Multi-buffer array that enables programed transmission to be completed
    without CPU intervention. So, here we can configure a trigger source for each Transmit group and whenever trigger occurs it transmits the configured buffers in that transmit group. If we didn't write any data to the buffer arrays of the corresponding Transfer Group and after receiving trigger it sends default zeros in that arrays. 

    2) Regarding the chip select, does the chip select automatically pull high when MibspiSetData() is executed?
    Ans) Yes it will be automatically controlled by SPI hardware

    In master mode, if the SPICS pins are configured as functional pins, then the pins will be in output mode. A write to the master’s SPIDAT1/SPIDAT0 register will automatically drive the SPICS signals low. The master will drive the SPICS signals high again after completing the transfer of the bits of the data.

    For more details on this please refer following section 28.2.5 in TRM.

    --

    Thanks,

    Jagadish.