2023-08-28 05:31 AM
After the arm_fft function, I am running into a hard fault handler when running in debug mode. I am not getting why is it happening. Please help with this.
Is it because of some wrong memory allocation?
2023-08-28 05:37 AM - edited 2023-08-28 05:38 AM
Suggest you get a Hard Fault Handler implementation that prints out register details, rather than stopping in a while(1) loop, so you can determine what the actual cause is rather than have to guess.
Determine what memory or related access it is objecting too, and work back from there.
2023-08-28 05:38 AM
Hard to say without more info. Perhaps bogus values in fftHandler. Is the FPU enabled?
2023-08-28 06:05 AM
I was able to solve that by doing this:
arm_rfft_fast_f32(&fftHandler, &fftIn, &fftOut, 0);
but now this portion of code giving the same hard fault error
2023-08-28 07:02 AM
A loop that depends on z and p that never get modified. Can't end well.
2023-08-28 08:57 AM
The logic and index here are confusing, no comments as to goals or expectations.
Could some of these values go negative or exceed bounds?
Not sure what's happening? Instrument the loop, see if it is moving things as expected or anticipated..
2023-08-29 03:37 AM
You are right. There was a problem with the loop.