This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
compiler: TI v20.2.5.LTS
Code Composer: 11.0.0
SDK: simplelink_cc13x0_sdk_4_20_01_03
I've recently hit a Hard Fault: FORCED: BUSFAULT: PRECISERR.Data Access Error Address = 0x0 from SPI.h exception thrown from the HWI module.
code being called:
SPI_Handle handle; //handle that needs to be closed. SPI_Params params; SPI_Params_init(¶ms); FRAM->params = ¶ms; FRAM->params->mode = SPI_MASTER; FRAM->params->transferCallbackFxn = NULL; FRAM->params->frameFormat = SPI_POL1_PHA1; //mode 3 FRAM->params->bitRate = DEBUG_RATE; handle = SPI_open(Board_SPI0, FRAM->params); ...
where this exception always occurs in the SPI_Params_init() function.
Looking into memory the stack is fine, but I raised the default value of the system stack to 1228 to be sure.
As some of the only other questions in the forum about this error mention recently installing RF studio, that is something I have done recently between this error happening or not; but that could be a red herring.
My question is what causes the specified error, and if there is anything obviously wrong in my code sample or that I could check to resolve it?
A typical cause of this type of error is that you for some reason start to access parts of memory you should not be accessing.
- Stack size: That some object is larger than allocated
- NULL pointers: Undefined pointers
- Other memory allocation issues.
Do you have a minimum example that could run on a Launchpad and fails? Since the error you are seeing is in a init function, the full SPI functionality is not needed.
SmartRF Studio should have no impact on this. Studio also only access the RAM on the device meaning it doesn't alter the flash content.