Tool/software: Starterware
Hey everyone,
i am trying to set up an eqep driver for my beaglebone white. I believe that i have enabled the power and clock domain that are required.
My next step is to pass (with the following piece of code) the desired values to the appropriate registers.
HWREG(SOC_EQEP_1_REGS+EQEP_QPOSCNT) = 0x00000000; HWREG(SOC_EQEP_1_REGS+EQEP_QPOSINIT) = 0x000A; HWREG(SOC_EQEP_1_REGS+EQEP_QPOSMAX) = 0xFFFF; HWREG(SOC_EQEP_1_REGS+EQEP_QDECCTL) = 0x0800; HWREG(SOC_EQEP_1_REGS+EQEP_QEPCTL) = 0x12B8; HWREG(SOC_EQEP_1_REGS+EQEP_QEINT) = 0x0000; HWREG(SOC_EQEP_1_REGS+EQEP_QFLG) = 0x0000; HWREG(SOC_EQEP_1_REGS+EQEP_QCLR) = 0x0000;
well everything seems to work as wanted except for when the code reaches the value of EQEP_QEPCTL register...
i mean the program seems to stuck there, unable to move on and pass the other values to the other registers..
The same happens if i comment out the line regarding QEPCTL register but i leave those lines regarding QEINT and QFLG registers..
My guess is that the eqep module is not properly initialized or that the value i give to those registers are not acceptable(but i have tried other values with the same result)..
So could anyone help or point out the proper (and necessary) way to initialize the eqep module?
Thanks in advance!