Using FreeSoC2 with SSD1331 SPI oled module and Littlev GL ends up in infinite loop

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SaKrst
Level 3
Level 3
5 likes given First like received First like given

Hello good people from Cypress forum,

I have a problem using mentioned OLED module with Littlev graphic library that uses SPI to communicate as it ends up in infinite loop of IntDefaultHandler function.

Here is the screenshot from debug session

Debugger.jpg

When I go step by step, everything works fine until 135 line of lv_task.c file. After that I need to pause debugging and it ends up as shown on image that I posted above.

By using Google search I found that ending up in this infinite loop is (mostly) related to memory problems, but then when using I2C protocol to send data to SSD1306 controller everything works fine even though the same library is used, and the only difference is in using I2C instead of SPI.

The Littlev library was successfully used with ILI9341 controller in parallel mode with no problems as well.

Also, here is the minimal archive of the project in the attachment.

Any kind of help to resolve the problem or to understand what is going on would be great,

Thanks

0 Likes
1 Solution
SaKrst
Level 3
Level 3
5 likes given First like received First like given

The problem was resolved on LittlevGL forum by one of the developers of the graphic library.

I made a mistake in main.c while declaring gbuff[SSD1331_BUFF] array.

Instead of static uint8 gbuff[SSD1331_BUFF] it should have been static lv_color_t gbuff[SSD1331_BUFF].

After that all of the examples that I've tried are now working.

In the attachment is updated project archive with working examples if somebody is interested in trying it out.

Thanks RakshithM_16​ for quick response.

View solution in original post

5 Replies