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.

CC1350: Hard Fault: FORCED: BUSFAULT: PRECISERR.Data Access Error.

Part Number: CC1350

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:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
SPI_Handle handle; //handle that needs to be closed.
SPI_Params params;
SPI_Params_init(&params);
FRAM->params = &params;
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);
...
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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. 

  • Thank you for that information!

    I do have a minimal version that runs on a launchpad and fails with the same exception

  • I don't really understand why my problem was resolved, since I commented everything else in that .c file out, built the project, and then uncommented it and built it again and it ran without hitting that runtime error.

  • Let me know if the error pops up again.