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

Make MPY ARCH supports for ESP32C3 RISCV #14450

Open
3 of 5 tasks
m24h opened this issue May 8, 2024 · 2 comments
Open
3 of 5 tasks

Make MPY ARCH supports for ESP32C3 RISCV #14450

m24h opened this issue May 8, 2024 · 2 comments

Comments

@m24h
Copy link

m24h commented May 8, 2024

Checks

  • I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.

  • I've searched for existing issues regarding this feature, and didn't find any.

Description

I tried to use Micropython to do real-time tasks on the ESP32C3, but it doesn't support hard interrupts, I can't get the timestamp and Pin state of the IRQ event (why don't MPY give such important informations rather then a useless Pin object), and if I use timer for resampling, the time jitter of the timer event is too bad (also a soft interrupt), so I had to try to use native code mpy, but the RISCV architecture of ESP32C3 is not supported, and there is no way to do it without customizing the firmware. How can I get millisecond-level time processing accuracy?

Code Size

I'm not sure about the code size requirement for this feature, maybe it's less than several kilo-bytes.

Implementation

  • I intend to implement this feature and would submit a Pull Request if desirable.
  • I hope the MicroPython maintainers or community will implement this feature.
  • I would like to Sponsor development of this feature.
@rkompass
Copy link

Did you try to use the pin_object.irq() method? It might provide additional information like
pin_object.irq().flags() and pin_object.irq().trigger() in case it is implemented.
In the w600 port there is now also an experimental pin_object.irq().timestamp_us() now, btw..

@robert-hh
Copy link
Contributor

The ESP port does not support pin_object.irq().flags() or the keyword option hard.

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

3 participants