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

Different value of current current on Buspirate display and TTY #16

Closed
nuschpl opened this issue Apr 3, 2024 · 4 comments
Closed

Different value of current current on Buspirate display and TTY #16

nuschpl opened this issue Apr 3, 2024 · 4 comments

Comments

@nuschpl
Copy link
Contributor

nuschpl commented Apr 3, 2024

When changing values of voltage with W option within SPI mode I see current draw arround 3-5mA in terminal and arround 200mA on display, both are constantly changing. It probably doesn't clear leading digits on screen as the value could be like 203.5ma on screen and 3.5mA on TTY and second digit on screen also changes when draw ramps for a while over 10mA.

@DangerousPrototypes
Copy link
Owner

This is very odd. I enabled the power supply and grounded the VOUT pin. It goes to 400mA, but when removed it goes back to zero. Is it still an issue in the latest firmware? Any chance to continue this discussion in the forum? You can use your github account to login.

@nuschpl
Copy link
Contributor Author

nuschpl commented Apr 5, 2024

@henrygab
Copy link
Collaborator

henrygab commented Sep 28, 2024

For those following along, and trying to reason about the code that may be related to this investigation, I found the following details from Ian himself concise and helpful:

As much as possible, [BP5 code uses] a cooperative multitasking loop on both cores
... the second core that does LCD, USB, LEDs, analog monitoring , etc is never blocking.

Where we have possible contention rp2040 has an atomic bit they call spinlock.
The firmware has spinlocks on the USB IO FIFO queue, shared SPI onboard controller,
and now the ADC.

An interrupt every 0.5s sets a flag to update the toolbar and display.
The second core loop checks what is eligible to be updated and sets some flags.
The system monitor then goes through the update flags, checks what new digits
are different than previous readings (3.3v vs 3.2v), then updates only those in the
toolbar [buffer] and LCD (_3) [which helps] to minimize API traffic
and VT100 refresh bandwidth.

@henrygab
Copy link
Collaborator

Hi @nuschpl,
I'm closing this issue because neither the forum thread nor this thread has had any activity in many months. Of course, if you're still able to reproduct this, please feel free to reopen the issue!

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

No branches or pull requests

3 participants