I'm working on a project that uses a 2.8" arduino LCD. The LCD uses an ILI9341 driver. Now I'm testing this library: https://github.com/martnak/STM32-ILI9341 with an STM32F4-Discovery board (STM32F407) that runs RTOS. The problem is, if I do not use RTOS, the library works great. On the other hand, when I enable RTOS, The commands does work only before "MX_FREERTOS_Init();" in main.c. I thought it was a problems of "HAL_Delay" instead of "osDelay" but it looks like SPI stops sending data to the LCD after some bytes sending. Here is what I coded inside the task:

  ILI9341_Init();//initial driver setup to drive ili9341
  ILI9341_Draw_Image((const char*)snow_tiger,SCREEN_VERTICAL_1);

When I do some debugging I get this message "Hard Fault Detected". I use no DMA, Interrupt, just Hardware SPI.

Can somebody help me? Thanks!


closed as unclear what you're asking by Chris Stratton, Edgar Brown, Finbarr, Voltage Spike, metacollin Feb 22 at 23:21

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


I fix the problem by changing the stack size. Once I change the stack to a bigger one, the library works perfect


Not the answer you're looking for? Browse other questions tagged or ask your own question.