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.
Hi,
Using Input Xbar registers, gpio pins are configured for each ecap mdoule.
When i use the below line of code, module is working
gstrInputXbarRegs.INPUT13SELECT = u16EcapPin; (gpio selection as user-input)
When I configure ECCTL0.INPUTSEL using below lines by configuring GPAPUD and GPAQSEL2 registers, the module is not working
strECap7Regs.ECCTL0.bit.INPUTSEL = 13;
Is there any other configuration needed? How to use it?
Thanks,
Subha.
gstrInputXbarRegs
strECap7Regs
Have you renamed them?
Also one is the XBAR register one is the ECAP register. The two are not related.
Hi,
Yes, gstrInputXbarRegs and strECap7Regs are renamed.
When I'm using this line alone, 'gstrInputXbarRegs.INPUT13SELECT = u16EcapPin; (gpio selection as user-input)'
module is working.
When I configure like below, as per TRM, the module is not working.
gstrGpioCtrlRegs.GPAPUD.bit.GPIO24 = 0;
gstrGpioCtrlRegs.GPAQSEL2.bit.GPIO24 = 0;
gstrInputXbarRegs.INPUT13SELECT = u16EcapPin;(here i took 24 for u16EcapPin as user input)
strECap7Regs.ECCTL0.bit.INPUTSEL = 13;
What is the reason?
gstrGpioCtrlRegs.GPAPUD.bit.GPIO24 = 0;
gstrGpioCtrlRegs.GPAQSEL2.bit.GPIO24 = 0;
removing these two lines causes it work?
gstrGpioCtrlRegs.GPAPUD.bit.GPIO24 = 0;
gstrGpioCtrlRegs.GPAQSEL2.bit.GPIO24 = 0;
strECap7Regs.ECCTL0.bit.INPUTSEL = 13;
If I remove these 3 lines, it works.
But as per TRM of F28388D, these lines are necessary for ecap input selection.
Can you try to see which one of the three lines is causing it? try removing them one at a time and try the code.
I tried it.
strECap7Regs.ECCTL0.bit.INPUTSEL = 13;
This line causes issue. By default, value of ECCTL0.INPUTSEL is 0x7F. But when I configure it to 13(INPUTSEL13) or any other, it stops working.
In Table 17-1 Input X-BAR Destinations from TRM of 2828x, any Ecap modules can use any INPUTSELECT registers.
I use from INPUT7SELECT to INPUT13SELECT registers for ecap modules 1 to 7.
The input xbar destination is not what determines ECCTL0.INPUTSEL.
I think you may have to use "12" as the register value.
Thanks for the input. After changing to correct values in ECCTL0.INPUTSEL, modules are working.