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.

TMDS64EVM: Issues Observed with GPIO Output Read and Interrupt Setup

Genius 3215 points

Part Number: TMDS64EVM

Hi All,

During debugging, I checked the GPIO status using an oscilloscope.
As a test, I added an API to set CNFIG_GPIO_SPI_REQ_PIN to LOW immediately after startup, but when I read it right afterward, it was HIGH.

I am currently checking the circuit to see if there is an issue with the input common level of CNFIG_GPIO_SPI_REQ_READY, but does the command to read a GPIO pin get affected by the circuit?

Also, I would like to use CNFIG_GPIO_SPI_REQ_READY for input interrupts, but I cannot find an option to set the function that is called when an interrupt occurs. How do you wait for the interrupt to trigger?

Best Regards,

Ito

  • Hi Ito,

    Please check the GPIO_DATA register and confirm, Is the bit representing the GPIO pin cleared properly?

    Also, I would like to use CNFIG_GPIO_SPI_REQ_READY for input interrupts, but I cannot find an option to set the function that is called when an interrupt occurs. How do you wait for the interrupt to trigger?

    You can refer to the gpio_input_interrupt example which configures a GPIO pin to generate interrupts and also configures ISR callback in the application.

    Regards,

    Tushar

  • Hi Tushar,

    By adding HwiP_enable after executing functions like Drivers_open, interrupts started occurring in the callback function.
    However, unless I pause execution with breakpoints, the callback does not run the expected number of times.
    Please check the GPIO_DATA register and confirm, Is the bit representing the GPIO pin cleared properly?
    There is no GPIO_DATA register, so is it okay to use the contents of MCU_GPIO0 instead?
    Also, if I execute GPIO_PinWriteLow and the corresponding bit in INPUT_DATA of MCU_GPIO0 is 1,
    does that mean the cause is electrical factors from the evaluation board?

    Best Regards,

    Ito

  • Hi Ito,

    By adding HwiP_enable after executing functions like Drivers_open, interrupts started occurring in the callback function.

    To get an interrupt the above step is a must.

    There is no GPIO_DATA register, so is it okay to use the contents of MCU_GPIO0 instead?

    I am referring to the below registers.

    Also, if I execute GPIO_PinWriteLow and the corresponding bit in INPUT_DATA of MCU_GPIO0 is 1,

    What is the direction of the GPIO Pin? The input data register is not controlled by software, it depends on the external signal.

    You should check the GPIO_OUT_DATA registers.

    Regards,

    Tushar