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.

using pin 55 from tms570ls1224 to generate an interrupt to start the MIBSPI5

Other Parts Discussed in Thread: HALCOGEN, TMS570LS1224

Hi

I'm starting to use HALcogen to generate the code for a project of mine and was wondering if there is a problem with using the pin 55 of the MCU to generate the interrupt so the MCU starts receiving the data from an external component... I ask this because Im unsure if there is a problem with using that pin instead on the pin 97, NENA.

What is the difference between the MIBSPI5 tab and the SPI5 tab?? I looked on the Datasheet but I did not find anything...

Also... how do i congifure correctly the pins to work as gpio on the MIBSPIX? do I need to activate the interrupt or just on the sub-tab "MIBSPIX port

Best regards

  • Is the SPI on the TMS570LS1224 the master or the slave? Normally neither the nCS nor the nENA pins are used for generating interrupts. Interrupts are generated by the SPI upon a completion of a transfer. You might want to review the overview section on the SPI in chapter 28 of the TRM.

    When in MibSPI the SPI is configured to use buffers. In standard SPI mode, the SPI must read from the receive buffer and/or load the transmit buffer for each transaction. On the MibSPI tab you have a "Transfer Groups" subtab which is not included on the SPI tab.

    Yes, use the port tab of the MibSPI/SPI to configure unused SPI pins as GPIO.

  • Yes, the MCU is the master. And it only receives the data from an external ADC, so no TX is required. Only the RX. 

    So, should I use the MIBSPI or the normal SPI? I guess the pins are the same right??

    For HALcogen to generate the files, I need to activate the drivers of those modules right?? Even if Im using them as GPIO

    best regards and thanks!!

  • Yes, you need to call spiInit(). It configure the SPI including configuring the pins. I would start with normal SPI unless you already know that the CPU will not be able to read the received data in time to prevent missing subsequent data. To read data on the SPI, you must do a dummy transmit. If the ADC supports it, (drives a ready signal low) you can do the dummy transmit and use the nENA pin to make the micro wait until the ADC is ready. You can get an interrupt after the transfer completes.
  • the SPI has a delay for receiving data and the MIBSPI dont? I didnt get that...

    The pin ENA is already used for something else...
    The ADC drives a low pin, and Im usin the pin 55 from the MCU, which generates an interrupt and I 'm planning on using that to start reading the data from the ADC when the interrupt goes on. Also, the TX pin is also used as GPIO for other function...

    Thanks!!!