Hi,
I'm using eQEP for getting input pulses and counting them direction dependent. Initialisation looks like this (some pseudo code just to show what I'm doing):
<enable PWMSS clock> //write registers: QEP_QDECCTL=0x0800 QEP_QEPCTL=0x1038 QEP_QPOSMAX=0xFFFFFFFF QEP_QPOSINIT=0x7FFFFFFF QEP_QCAPCTL=0x0000 // enable clock for eQEP (SOC_PWMSS1_REGS + PWMSS_CLOCK_CONFIG)=PWMSS_QEP_CLK_EN
This seems to work well but I have troubles reading the counted value from QPOSCNT register. Performing a simple read-access to it (using a pointer to its address and not waiting for anything) seems to stall the whole system. When I do it within a timer interrupt I can see the timer frequency go down. When I do it in main loop repeatedly I can see the calling frequency of this loop goes down dramatically.
So it seems reading the register consumes a nameable amount of clock cycles which makes it impossible to use this functionality for real-time tasks. So...what could cause this behaviour? Why is plain reading of a register that slow?
Thanks!