cry_viem 0 Posted August 28, 2014 Share Posted August 28, 2014 hi! everyone, i have a lm4f120h5qr, i try to code for QEI but it didn't work, may i was wrong or lmf4120h5qr have no QEI module ? help me please, i'm newbie so i may not know a lot of thing. here is my code #include "inc/hw_types.h" #include "inc/hw_memmap.h" #include "inc/hw_gpio.h" #include "driverlib/sysctl.h" #include "driverlib/pin_map.h" #include "driverlib/gpio.h" #include "driverlib/qei.h" int pos; void main(void) { //set system clock SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); //enable qei0 module SysCtlPeripheralEnable(SYSCTL_PERIPH_QEI0); //enable portD SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); // GPIOPinTypeQEI(GPIO_PORTD_BASE, GPIO_PIN_6); // GPIOPinConfigure(0x00031806);// i could found GPIO_PD6_PHA0 in PART LMF4120H5QR // so i fill direct hex code from other PART ??? //-------------------------------------------------------------------- QEIDisable(QEI0_BASE); QEIIntDisable(QEI0_BASE,QEI_INTERROR | QEI_INTDIR | QEI_INTTIMER | QEI_INTINDEX); QEIConfigure(QEI0_BASE, QEI_CONFIG_CAPTURE_A | QEI_CONFIG_NO_RESET | QEI_CONFIG_QUADRATURE | QEI_CONFIG_NO_SWAP,1000); QEIPositionSet(QEI0_BASE, 500); QEIEnable(QEI0_BASE); while (1) { //i set breakpoint at here to update view pos pos = QEIPositionGet(QEI0_BASE); SysCtlDelay (1000); } } the variable "pos" = 0 all time of debugging ????? thank all? @@' Quote Link to post Share on other sites
Lyon 3 Posted August 28, 2014 Share Posted August 28, 2014 Hi, Your guess is correct - lm4f120h5qr (re-named TM4C1233H6PM) does not have QEI module. L cry_viem 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.