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

fix wrong states on PE output pins (and SD-card failure on restart) #278

Closed
wants to merge 1 commit into from

Conversation

r-schmidt
Copy link
Contributor

The output register status buffer was initialized fix to {0xff,0xff} although the output registers were set to {0x00,0x00}. That buffer is used by Port_Write() to determine the values of the bits for the other pins. So those get set to 1 (high).

Since the peripheral power on the Espuino 4-layer mini PCB is switched on by setting a pin on the PCA9555 low, that power is first turned on (by Port_Init()), then turned off (by the Port_Write() call in AudioPlayer_Init()) and then turned on again (by Power_PeripheralOn()). That caused a 12.5 millisecond disruption of the external 3.3V which some SD-cards don't like.

The output register status buffer was initialized fix to {0xff,0xff}
although the output registers were set to {0x00,0x00}.
That buffer is used by Port_Write() to determine the values of the
bits for the other pins. So those get set to 1 (high).

Since the peripheral power on the Espuino 4-layer mini PCB is switched
on by setting a pin on the PCA9555 low, that power is first turned on
(by Port_Init()), then turned off (by the Port_Write() call in
AudioPlayer_Init()) and then turned on again (by Power_PeripheralOn()).
That caused a 12.5 millisecond disruption of the external 3.3V which
some SD-cards don't like.
tueddy added a commit that referenced this pull request Dec 10, 2023
@tueddy
Copy link
Collaborator

tueddy commented Dec 10, 2023

Tested with Lolin D32 pro /SD-MMC /blue PCB and Mini4Layer PCB, everything works as expected!
Applied by cherry-pick to DEV branch. Thanks for your contribution!

@tueddy tueddy closed this Dec 10, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants