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.

TMS570LS1224: SPI MOSI line does not pull up when I configure it to pull up

Part Number: TMS570LS1224

Hi, there. I set spiREGx -> PC7 's SIMO bit to 0, and set spiREGx -> PC8 's SIMO bit to 1, and I think it should pull up, but I use oscilloscope to see that it is still pull down. My code is

int main(){

spiInit();         //Set the spiREG -> PC7 & 8 correctly, and they are enabled as SPI functional, and direction is output

while(1);        //SIMO keeps low at this point

}

thanks.

  • Hi,

    Which bit of SPIPC7/PC8 is used to enable the pull for SIMO0 pin? Bit 10 or bit 16 can be used to set pull-disable for SIMO0. If a 32-bit write is performed, bit 10 will have priority over bit 16.
  • Hi, QJ Wang :

      This is the code in spiInit(),

        /** - SPI4 Port pullup / pulldown selection */
        spiREG4->PC8  =   (uint32)((uint32)1U << 0U)  /* SCS[0] */
                                     | (uint32)((uint32)1U << 8U)  /* ENA */
                                     | (uint32)((uint32)1U << 9U)  /* CLK */
                                     | (uint32)((uint32)1U << 10U)  /* SIMO */
                                     | (uint32)((uint32)0U << 11U); /* SOMI */

        /** - SPI4 Port pullup / pulldown enable*/
        spiREG4->PC7  =   (uint32)((uint32)0U << 0U)  /* SCS[0] */
                                     | (uint32)((uint32)1U << 8U)  /* ENA */
                                     | (uint32)((uint32)0U << 9U)  /* CLK */
                                     | (uint32)((uint32)0U << 10U)  /* SIMO */
                                     | (uint32)((uint32)0U << 11U); /* SOMI */

    I only set SIMO[0], I have not touched the SIMO[1+] lines. Also, outside of this initialization code, I have not re-configure any SPI registers.

  • Hello Joe,

    Have you solved this problem?