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,
For a project I need to read ADC acquisitions and position encoders at precise moments.
In the design, ADC SOCs are synchronized by the PWM event triggers (TBCTR at zero) and generate an IT at the end of the conversions. eQEP must be read during the same PWM event and I generate an IT too.
In the TRM (27.5.2.2 Strobe Event Latch), it is mentioned that it is possible to latch position counter from external pin or ADCSOCA & B.
Do you have more information on the way to use this function in order to reduce the number of ITs?
Sincerely.
Jerome
Hello,
Finally I think that I have found the solution. The reply was not in ADC, PWM or eQEP chapters but in 3.14.17 - SYNC_SOC_REGS of TRM. ADCSOCOUTSELECT register manages the ADCSOC A or B source selection.
Consequently, do I have to set a strobe pin (I don't use one in my design) as strobe event latch is ORed with ADCSOC?
Sincerely.
Jerome
Hi Jerome,
Inorder to latch Position counter of eQEP on ADCSOCA or ADCSOCB, inside eQEP you need to set eQEPx.QEPSTROBESEL.STROBESEL to 0x2 (ADCSOCA) or 0x3 (ADCSOCB).
Best Regards,
Nirav
Hi Nirav and thanks you for your reply.
I have one last question around this problem. As the strobe event latch function is a logic OR between ADCSOC and a latch input pin, do you know if I have to set a pin to 0?
Sincerely.
Jerome
Hi Jerome,
Not required, you can use eQEPxS pin as a GPIO, do not configure GPIO mux to eQEPxS, that way it will be only driven by ADCSCOC events.
Best Regards,
Nirav