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.

RTOS/TI-RTOS: Hard Fault: FORCED: BUSFAULT: PRECISERR.Data Access Error.

Part Number: TI-RTOS

Tool/software: TI-RTOS

Dear Sir, 

I am trying to write some data on MicroSD card.  I am using MSP432p401R launchpad as a main processor and data is acquired from ADS1298. 

I can't able to track down which statement is causing that issue. The source code i have written is working good when i am writing Data for single use. But if i write multiple times and switch between the thread multiple times. It is giving BUSFault error either Precise or imprecise. 

This week only, i have started using TI-RTOS. 

One more thing HwiStack is overrun. 

Any suggestion will be appreciated. Thanks a million in advance.

Regards

Anurag Tamboli

  • Hi Anurag,

    Here's a link that offers some debugging techniques: training.ti.com/debugging-common-application-issues-ti-rtos

    Additionally, how are you setting up the vector table? Are you plugging interrupts with driverlib calls or using the Hwi module in TI-RTOS?

    Todd
  • Hi Todd,

    Thank you for replying back. I haven't set the vector table being a beginner in TI-RTOS. I thought not to mess around too much.

    Vector table configuration are default ones only.  I did not understand when you say " Are you plugging interrupts with driverlib calls or using the Hwi module in TI-RTOS? " 

    Actually i have modified example code for SPI communication and FatFs file system example, changed/modifed the routine to access data or write data to SD Card.

    Everything works fine if source code flow just open the SD Card, write data and close the file. But if i keep the file open and switch the thread, after some processing i try to close it. It throws "FORCED BUS FAULT: PRECISERR or IMPERSIERR".  

    I can send you a copy of code if you want to go through it. 

    Regards

    Anurag Tamboli

  • Where did the example code come from? Was it based on TI-RTOS initially or driverlib? If it was driverlib, you'll probably need to move from using Interrupt_registerInterrupt (or something similar to that) to Hwi_create (or Hwi_construct).

    Can you attach the example?

    Todd
  • Hi Todd, 

    I have installed SDK from TI only. I am using TI-RTOS examples in MSP-EXP432P401R. 

    I am quite sure, example code doesn't use interrupt_registerInterrupt, Because when source code experience BUS FAULT. It loops in Hwi_excHandler(). 

    Regards

    Anurag Tamboli

  • Hi Anurag,

    If the Hwi stack is overflowing it will be causing memory corruption which could result in bus faults or other odd errors.  The first thing to do is to increase the amount allocated for this stack.  

    In your Hwi module settings graphical view shown above, you can increase the "System (Hwi and Swi) stack size" from 2048 to a larger value, then save the file and rebuild and reload the program.  You should be able to see the increased stack size shown in the ROV tool (in the “Hwi” module, in the “Module” tab, in the “hwiStackSize” column).  

    If you increase the size enough to avoid the Hwi stack overruns do the bus faults go away?

    Thanks,
    Scott

  • Hi Scott,


    Thanks for the suggestion. It worked somehow. Looks like more things to learn.

    Regards
    Anurag Tamboli