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_Fill_Screen(WHITE);
ILI9341_Set_Rotation(SCREEN_VERTICAL_1);
ILI9341_Draw_Image((const char*)snow_tiger,SCREEN_VERTICAL_1);
osDelay(2000);
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!