Skip to content

What is the priority of EncoderTool T4.x? #49

@bdlabitt

Description

@bdlabitt

What is the priority of the EncoderTool? What is the priority of the callback function onEncoderChanged?
How can the priority be changed (if necessary)? I'm getting very long ISR's on occasion, and I'm wondering why that might be. I set the physical pins to have priority 32, but I still see long ISR's. Longer than expected, and sometimes longer than the time between encoder edges.

My observation is while my system is controlling a stepper, the encoder ISR is slipping counts relative to the index pulse. In my onEncoderChanged callback if the index is active, I record the count value. The count is slipping. The value should be invariant (relative to modulo the encoder wheel). This slippage is occurring at rates of only 400 RPM with a 1024 PPR wheel (4096 edges per rev).

This is preventing the implementation of "thread to stop", which relies on accurate angular synchronization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions