Problem using lvgl in custom thread

I'm using an nRF5340DK and an Adafruit 2.8" TFT Touch Shield to implement a touch keyboard on the board. As you can see in the attached project, I would like to use the lvgl functions in a custom thread, but this causes the board to reboot constantly. Any idea what is causing this?

This image shows application output. Boards reboots all the time.

Project:

threads_sample_lvgl.zip

Best regards,
Pablo

Useful information about the project:

- Using nRF5340DK and an Adafruit 2.8" TFT Touch Shield
- Using nRF Connect SDK v2.2.0.
- The project is based on the example: Basic Thread Example

Parents
  • Hello Pablo,

    I have looked at your code. You have defined stack size for each thread is 1024 but in the ta_event_cb() function set buffer size 2048. So, it is most likely stack overflow issue. Large buffers like this should declare either as static or as global. Changing the line char buff [2048] to static char buff[2048] would fix the problem. 

    You can try that and let us know the consequence. 

    Thanks.

    BR

    Kazi

Reply
  • Hello Pablo,

    I have looked at your code. You have defined stack size for each thread is 1024 but in the ta_event_cb() function set buffer size 2048. So, it is most likely stack overflow issue. Large buffers like this should declare either as static or as global. Changing the line char buff [2048] to static char buff[2048] would fix the problem. 

    You can try that and let us know the consequence. 

    Thanks.

    BR

    Kazi

Children
Related