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.

Issue enabling pull-ups and -downs on TMS570LS1224 ?

Other Parts Discussed in Thread: TMS570LS1224

Hello everyone,

I am a student and working on a project with the TMS570LS1224 MCU.

I am trying to establish a connection via 4-wired SPI to a device, but its SOMI voltage output level is too low for recognization in scope and MCU (~+-100mV).

I am wondering if the pull-down for the respective SOMI-pin is enabled and if so, how do I disable it and enable the pull-up. I already have done some measurement with my scope's analogue channel and came to the result that pull-downs for SIMO and SOMI ARE activated, though they are disabled by software.

For this, I set SPIPC8[11] and cleared SPIPC7[11]. Are there any other settings I need to configure?

I am working in compatibility mode, on MibSPI3 and CLK, SOMI, SIMO, CS are configured as SPI functional.

I have been working on that issue the last few days and I am really wondering what's happening here.

Thank you for your help

Greetings

Cyrus

  • Cyrus,

    SPIPC7 (Pull Disable register) is used to enable or disable the pull option on the SPI pins. 
    0: pull are enable (Default out of reset)
    1: pull are disable

    SPIPC8 (Pull Select) is used to select either a pull-up or a pull-down on the SPI pins.
    0: pull-down is selected. (Default out of reset)
    1: pull-up is selected.

    So in your case, if you want a pull-up on SPISOMI, you will have to write 1 to SPIPC8 bit 11.

    What I don't understand in your post is the voltage level on your external device.
    What is this device?
    Is it possible that this device is working in open drain mode?
    If this is the case, this device does not drive a level 1 and is expecting an external pull to create the high level.

    The internal pull-up in our device may not be strong enough and may require that an external pull-up to 3.3v has to be used.

    The SPIPC6 Register will allow you to configure the SPI in open drain mode. By default, out of reset the SPIPC6 is 0 meaning that an output set to logic 1 will drive the pin to 3.3v and a logic 0 will drive the pin to 0v
    This can be changed writing 1 to the corresponding pin that need to be configured in open drain.

    Please let me know if I've clarified your question.

  • Jean-Marc,

    thank you for your quick reply.

    SPIPC7[11] is 0
    SPIPC8[11] is 1

    I have tried Open Drain mode, but there was no difference.

    The device is an Analog Devices ADXL312 accelerometer. In its datasheet there is no recommendation for a pull-up in SPI 4-wire mode, though I've tried to make it work this way.

    Now I am thinking the internal pull-up is not strong enough OR there is some other part on the board that is pulling it to ground. Unfortunately it is quite hard to determine, because I am working on a already designed board.

    Apart from this, do you have any other idea what may cause this problem?

    Best regards

    Cyrus

  • Cyrus,

    I've check the specification for this Analog Device.

    Can you check the state of pin 6 (nCS) on this device.

    You also said that this device is on an existing board.

    What is this board?
    Is the Analog device already connected to another device (Master)  and you are trying to connect our Hercules device in the middle?

    Without more detail on this setup, there is not a lot I can do.

    Please let me know.

  • Pin 6 is configured in the TMS as active-state low and CSHOLD for 2x 8bit transmission, as it is necessary for activation of the ADXL.

    In Code Composer Studio I see the registers SPIPC7 and SPIPC8 are configured correctly.

    I think there must be some other reason for this which I will find out and let you know what's happening here.

    Thank you Jean-Marc

    Best regards

    Cyrus

  • I have determined the reason for the low output voltage.

    Due to changes to the design, a pull-down was on another IC but on the same SOMI. After its removal it is working correctly now.

    Thank you

    Cyrus