I am trying to use the taskENTER_CRITICAL() and taskEXIT_CRITICAL() macros to perform some lines of critical and very time-dependant code inside one task (I have three running in total). It looks working fine but when I try to exit the critical section with taskEXIT_CRITICAL() it always crashes afterwards (HardFault_Handler error).
Please, any idea why happens and how to solve it?? Or what can I do?
Thanks a lot in advance and kind regards,