Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encodor miss interrupt with Arduino Espressif version 2.06 #268

Open
Vorms opened this issue Apr 1, 2023 · 1 comment
Open

encodor miss interrupt with Arduino Espressif version 2.06 #268

Vorms opened this issue Apr 1, 2023 · 1 comment

Comments

@Vorms
Copy link

Vorms commented Apr 1, 2023

From SimpleFoc I use only the encodor software.
I run with Esp32 wroom.
The software i wrote is for a cnc using dc motor.
Whe I use the arduino espressif esp32 version 1.06 the application run perfectly.
When I update the compiler using version 2.06, the encodor miss some interrupts.
Revert to version 1.06 fix the problem.
I see on the web, esp32 has hardware counters (PCNT).
Is some body using PCNT ?
Is it a good idea to replace interrupts pb PCNT ?

Regards

@askuric
Copy link
Member

askuric commented Apr 2, 2023

Hey @Vorms,

I did not have such issues on my part so far but it is possible that they did change some interrupt handling routines from one release to the other.

In the case of the cnc, I would certainly suggest using PCNT if possible. If you still want to use simplefoc then you can implement it in the form of a GenericSensor. I've actually tried it already and I was pleased with the result. Here is the example implementation.
https://community.simplefoc.com/t/generic-position-sensor-class-new-sensor-easier-to-support/1491/2?u=antun_skuric

Btw, from recently we also have a DC motor implementation of the library https://github.com/simplefoc/Arduino-FOC-dcmotor
Its still very much in its initial stage, but so far we had good results with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants