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.

TMS320F28035 pin configured as HRCAP then is it valid to read data through same gpio data register ?

Other Parts Discussed in Thread: TMS320F28035

Hi,

I am using TMS320F28035 DSC for BLDC motor control application. I have configured GPIO 09 as HRCAP1 pin. BLDC Motor will run on HALL commutation method. HALL-B sensor output is connected to HRCAP1,which will generate interrupt on every rising edge and elapsed time will be used to calculate the motor speed.

To drive BLDC motor i need to read HALL -B state to find out whether it is 1 or 0 to determine HALL state.

I am able to see HALL - B data(1 or 0) on GPIO -09 data register.

Since GPIO 09 is configured as HRCAP1 wether it is ok to read the data through GPIO -09 data register.? Is it a valid way to read the data through GPIO data register when same pin is configured to do HRCAP1 functionality ?

Earliest response will be appreciated.

 

Thanks & Regards,

Vedant

  • Hi Vedant,

    Since GPIO 09 is configured as HRCAP1 wether it is ok to read the data through GPIO -09 data register.? Is it a valid way to read the data through GPIO data register when same pin is configured to do HRCAP1 functionality ?

    GPIOMUX(ing) will allow you to use it either as a HRCAP or GPIO itself. You won't be able to use both the functionality simultaneously.

    Regards,

    Gautam

  • Hi Gautam,

    Thanks for reply..

    Pin is configured as HRCAP but i am able to see the data updation on gpio 09 data register as well. I want to know wether i can use the GPIO 09 data register to read the data coming on this PIN as well as to measure Speed through HRCAP. I am using only GPIO -09 data register to read the values,apart from that i am not using any GPIO functionality.

    Since i am able to see the correct data is getting reflected on GPIO 09 data register i want to confirm to use the same data for manupulation.In my case both functionalities are working fine for the same PIN but not sure if it gives the problem in future.

    Thanks & Regards,

    Vedant

  • Ohhk, the above detailed post made it all clear! Yup yup you can capture the data from the respective GPIODAT register.

    but not sure if it gives the problem in future.

    There shouldn't be any problems in future as such.

    Regards,

    Gautam