-
Notifications
You must be signed in to change notification settings - Fork 44
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
Potential fix for detecting idle PIO? #139
Conversation
I am going to test this now. |
This is the 1 wire LEDs, you can see the three frames (0xffffff 0x000000 0xaa55aa) are nicely packed to meet spec. Here is the 2 wire LEDs with this pull request. The frames are spaced out a lot, same as before. This is much faster than the 1wire protocol, but 16uS between frames still seems like a lot to me. Slowed it down from 5MHz to 800khz and we get the nice tightly packed frames of the 1wire protocol. Still, sending 32bit frames at 5mhz with nothing but packing in frames seems off to me. |
I merged the changes manually after testing. |
I reworked the syntax processor to use arrays of functions and removed the switch statements. I thought it was probably one source of the delay between frames. However, look at this. After the start frame there is a sizable delay, but then everything else queues up nicely. This includes data and a stop frame. Actually it doesn't seem to matter what is first, the first frame has a big delay after it. None of these functions are using the wait_for_idle at all, that is done at the end of the syntax execution. |
It sounds like you picked up the changes for the
If I'm understanding correctly:
Is this approximately correct? If so, then I will open a new issue referring to this thread, and close this PR. My first thoughts are to investigate the PIO program, the in/out buffer configuration for the PIO program, etc. |
Yes, I will go ahead and close this PR. I think I may have misled you on a different issue, and then confused your solution with a separate matter in this thread. I believe you are try to solve:
Which was two separate fixes
I thought your proposed solution was to this persistent issue. I tore apart and reworked the whole syntax compiler to hunt that one down. It was not something I had planned for the near future, but I'm very happy with the result. It didn't fix that between-frame bug. I did note the delay isn't there when pushing only data, it only happens between start frame ([) and whatever comes next. It is really weird. |
This may fix the early return from the prior version of the
hwled_wait_idle()
function?Need testing / verification.