Hi,
I have updated the board STM32F746G-DISCO (http://developer.microej.com/getting-started-sdk-stm-5.html) to add a joystick. After a while, the MicroEJ application is stopped and nothing is able to unlock the situation (joystick / touch / button press, display repaint, timer etc.).
However FreeRTOS keeps working: touch task is running when I play with the touch.
Do you have an idea about this dead lock ?
Thanks for your help
Hi William,
This kind of freeze may come from an issue in the core adaptation layer (LLMJVM_FreeRTOS.c
). The MicroJvm virtual machine can be stuck in LLMJVM_IMPL_idleVM()
waiting for a resume from LLMJVM_IMPL_wakeupVM()
.
Did you modify this file?
By default, the FreeRTOS implementation uses a semaphore to suspend and resume the virtual machine. The function LLMJVM_IMPL_wakeupVM()
calls xSemaphoreGiveFromISR()
if it is executed from an interrupt and xSemaphoreGive()
otherwise.
Make sure all your interrupt handlers call the functions interrupt_enter()
and interrupt_leave()
so that LLMJVM_IMPL_wakeupVM()
uses the right function.
See interrupts.h
header file for more information.
Best regards,
Jerome
Hi Jerome.
There is no difference between my LLMJVM_FreeRTOS.c
and the one available in STM32F746G-DISCO original platform.
It seems you’re right about the interrupt issue: my joystick interrupt does not update the interrupt flag. I have changed that yesterday and the application is still running this morning.
Thanks for your help
Regards