Hi,
I ran into a very weird error where the processor goes into a Hard Fault when I run a simple line like this:
uint8_t report_buffer [8]; int16_t motor_rpm, motor_torque; motor_rpm = my_func1(); motor_torque = my_func2(); ((float*)report_buffer) [0] = (float)motor_rpm; ((float*)report_buffer) [1] = (float)motor_torque;
The error appears in the line one before last.
My code size is big, but not that big. I am using a USB HID stack as a vendor specific HID device reporting 8 bytes every 16 msecs and a motor driver that is using the PWM0 module. Also using the FPU but not in Lazy Stacking mode.
The same code work fine before I declared the new variable int16_t motor_torque;
Please also help with how I can make a readable memory profile to find out if its a memory overrun or access violation or something using CCSv6.