molnardavid wrote on Wednesday, October 07, 2015:
Hi,
I am new at freertos and I need some help. I am using STM32F429 with CubeMx 1.7.0. FreeRTOS and STemWin and fatFs included. I have 2 tasks
blinky task - blinking a led on the board interval = 100ms
main task - read a bmp from sd card and draw it on LCD then clears LCD and start again
until this point everything works fine. Now I would like to detect touch screen from EXTI interrupt. interrupt works fine if I touch the screen almost ~10 interrupts triggered. There is only on thing in the interrupt handler -> print “ISR\r\n” to serial port. This also works fine. BUT!
After some touch (randomy changes but surely happens) my fatFs file systems responds that there is a timeout with the semaphor at f_open. And after this happened once then no more picture drawed on LCD bacause f_open reports this error.
My drawing function looks like this
void guiFile_drawBmp(char* path)
{
FIL file; /* File object */
FRESULT result; /* FatFs return code */
result = f_open(&file, path, FA_READ);
if (result != FR_OK)
{
printf("no file");
return;
}
GUI_DrawStreamedBitmapExAuto(Stream_GetData, &file, 0, 0);
f_close(&file);
}
Everything works fine until I press the touch screen and generate some interrups.
Interrupt handler:
/**
* @brief This function handles EXTI Line[15:10] interrupts.
*/
void EXTI15_10_IRQHandler(void)
{
/* USER CODE BEGIN EXTI15_10_IRQn 0 */
printf("ISR!!\r\n");
/* USER CODE END EXTI15_10_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13);
/* USER CODE BEGIN EXTI15_10_IRQn 1 */
//CTP_INT_Callback();
/* USER CODE END EXTI15_10_IRQn 1 */
}
Any help would be appreciated, thank you in advance
Dave