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

Touchscreen troubles #12

Closed
endian-albin opened this issue Apr 13, 2020 · 2 comments
Closed

Touchscreen troubles #12

endian-albin opened this issue Apr 13, 2020 · 2 comments

Comments

@endian-albin
Copy link
Collaborator

endian-albin commented Apr 13, 2020

I've been working hard to enable interrupt-driven touch events but without success. This is what I've discovered:

  • With LittlevGL (the currently used graphic library), any touch event crashes the application
  • It works with the Adafruit GFX library, but then the RTT console and logging must be disabled (otherwise the program crashes immediately) and it requires a switch to C++ and dependency on Arduino library functions.

So, how should we proceed?

  • Live without logging, introduce bloat and switch to Adafruit GFX?
  • Drop touch and focus on other things, but then how should user interaction take place? We've got the button, but how far does that take us?
  • Fix the crashes, rewrite the driver or do other hard work?
@endian-albin
Copy link
Collaborator Author

I've now pushed an experimental "tap to crash" branch (enable-touchscreen). Sometimes the debug log prints the following message before freezing the application:

assertion "p_cb->state != NRFX_DRV_STATE_UNINITIALIZED" failed: file "WEST_TOPDIR/modules/hal/nordic/nrfx/drivers/src/nrfx_spi.c", line 347, function: nrfx_spi_xfer

@endian-albin endian-albin added help wanted Extra attention is needed bug Something isn't working and removed bug Something isn't working help wanted Extra attention is needed labels Apr 13, 2020
@endian-albin
Copy link
Collaborator Author

I just looked inside cst816s_trigger.c and discovered the CONFIG_CST816S_TRIGGER_GLOBAL_THREAD. Using this instead of OWN_THREAD made it work!

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

1 participant