We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I have a an application crashing due to a hard fault. When I inspect the PC it tells me that the function being executed is the RTX function rt_sem_wait. The signature of this function is:
extern OS_RESULT rt_sem_wait (OS_ID semaphore, U16 timeout);
I am assuming that the only source of error which could result in a hard fault is the semaphore being invalid in some way, i.e. not a semaphore or corrupted (?).
The problem we are facing is a suspected heap corruption and our thinking is that the corruption happens to be hitting a semaphore somewhere. This semaphore then gets passed to rt_sem_wait and the hard fault is generated.
If anyone can offer any gems / general advice on any aspect of this problem I would be very appreciative - the heap corruption is proving very hard to find and our only definite feedback is a repeatable hard fault inside this function (and always this function).
TIA
Andy