I'm reducing eCAP interrupts at higher speed by dynamically changing the prescaler value on the fly and doing the appropriate capture register scaling.
My position seems to be drifting however and I wonder if it's happening when changing the prescaler.
Does the prescaler zero itself out when changed and do you get the proper scaling on the first transition after or does it freerun and it takes one sample before everything gets in sync?
Emil,I understand that you have found an interim workaround and restructured how you do the processing so it doesn't require changing the divider.After having some internal discussion on this we would like to understand what problem is that you are trying to resolve. There may be another method to achieve what you need.We would have to dig into this a big deeper, but when changing dividers it may actually take a few cycles for everything to smooth out in most cases. It seems it would also depend on if you are looking at the position relative to the last value (which may have been from a different prescaler) and where the event comes relative to the change.it would be good to get this understanding from you because to answer the question on the effects of modifying the input event prescalar dynamically, a deeper understanding of the eCAP module design will be important and we cannot neccesarily take your code and run some tests. It will be faster for our design team to look at the RTL of the module and determine the behavior of when the "new" divider value takes effect.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.