AnsweredAssumed Answered

Invalid function pointer exception

Question asked by Sudeep Chandrasekaran on Oct 9, 2018
Latest reply on Oct 16, 2018 by Kerry Zhou

I am trying to write a exception handler to catch invalid function pointer calls for Uc MK20DX256(cortex M4). I was assuming a hard fault exception would be raised for such calls unfortunately that doesn't seem to be the case. I had enabled the hard fault in the PE cpu components. PE created a hard fault exception catch routine. Tried catching this exception by enabling a breakpoint in the exception catch routine but this break point was never hit. It would be great if anyone could give clarity on the following:

 

1. Does Hard fault exception get raised during invalid function pointer calls ?

2. If Yes, whats it that I am doing wrong ?

3. If no, whats a good way to catch invalid function pointer calls ?@

Outcomes