-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Revert #10397 #10470
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
base: main
Are you sure you want to change the base?
Revert #10397 #10470
Conversation
Yes feel free to revert until I have time to address the issues. I agree the limitations need to be documented. However, the changes to |
…le=true" This reverts commit 8af7f37.
Alright, re-applied the respective commit. I'll test on S3 (that's all I have access to right now) and EDIT: Works fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this needs to be reverted completely. I would conditionalize using DMA by checking for SOC_RMT_SUPPORT_DMA
( #10466 (comment)). If DMA is available, then I think one could always use DMA, without a length limit.
If DMA is not available (e.g. on ESP32-S2), then the length should be validated to be <=128 (or is it <128?). We would then document the length limits in a LImitations section in the shared-bindings
documentation.
Am I missing something?
Using small values (<128) doesn't work with the DMA logic even on s3. This broke all existing code. So yea, conditions would need to be checked, or a try-except logic should be applied, trying DMA then the original logic. However when requesting >128 and DMA is unavailable, a new error would have to be shown. In either case, since the reversion is not wanted, I'll be closing this. |
OK, sorry, I missed the report in #10466 (comment) specifically. So a mostly-revert could be in order, but keeping my f999afd fix. The "more than one instance" is also an issue, and I don't know wether the "only channels 3 and 7" is a thing |
I'm not quite sure where this is supposed to be at this point, but below are the changes I made in my build. Specifically, take note of I'm not sure whether SOC_RMT_MEM_WORDS_PER_CHANNEL is ideal for non-dma mode, but it appears to be what was used in common_hal_pulseio_pulsein_construct(...) until recently. I originally tried using
|
This patch reverts #10397. See #10466.
I don't think the code the feature can be kept.
Ideally the underlying code could try to do it and fallback to the old behavior if it explodes,
but that would also require a good bit of documentation and testing for when and how it works.
(i.e. only first PulseIn object, only if maxlen > 128, on these chips)