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

fpioa: Fix access granularity issues #3

Closed
wants to merge 1 commit into from
Closed

fpioa: Fix access granularity issues #3

wants to merge 1 commit into from

Conversation

laanwj
Copy link

@laanwj laanwj commented Apr 7, 2019

I've had some issues where fpioa configuration was seemingly ignored; this resulted in keypresses being ignored (in kpu_conv and other demos) where the buttons on the Maix Go were assigned to HSGPIO >= 4.

The problem is that accesses to packed structures can be optimized to byte acceses (lb, sb instructions, noticed with gcc 8.2.0) whereas the registers require 32-bit accesses. Avoid this by implementing an
explicit conversion between uint32_t and the configuration structure.

I've had some issues where fpioa configuration was seemingly ignored;
this resulted in keypresses being ignored (in `kpu_conv` and other
demos) where the buttons on the Maix Go were assigned to HSGPIO >= 4.

The problem is that accesses to packed structures can be optimized to
byte acceses (`sbu` instructions, noticed with gcc 8.2.0) whereas the
registers require 32-bit accesses. Avoid this by implementing an
explicit conversion between uint32_t and the configuration structure.
@laanwj laanwj closed this Apr 7, 2019
@laanwj
Copy link
Author

laanwj commented Apr 7, 2019

apparently this is isn't the right solution either, sorry

@laanwj laanwj mentioned this pull request May 4, 2019
23 tasks
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.

1 participant