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.

LAUNCHXL-CC26X2R1: PRECISERR.Data Access Error

Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: SYSBIOS

Hello,

I need help fixing a PRECISERR.Data Access Error that is happening in my ble5 simple peripheral project. I am using version 2.3 of the simplelink cc26x2 sdk. I have been trying to track down the problem following the debug guide up to the point where the exception information is inspected using ROV ( ). I have implemented a execHandlerHook method and the program eventually ends in that method. Unfortunatelly, I do not know what to make of the ROV data I can collect at this point:

Can anyone help me interpreting it?

Best Regards

  • Hi Hermann,

    It would help if you provide information about what you are trying to do and what you expect to happen as well.

    The error is that you are trying to read from GTP0::CTL before that peripheral is turned on. Busfault address is 0x4001000C. Please see dev.ti.com/.../CPU_MMAP.html for reference

    Based on the PC (0x10003672) it looks like the function that caused the issue is TimerConfigure() from driverlib in ROM. You can find this if you load the driverlib.elf symbols via Run -> Load -> Add Symbols -> Browse -> <sdk>\source\ti\devices\cc13x2_cc26x2\rom\driverlib.elf and then look in the disassembly. Your LR is somewhere in Flash so I can't tell you what function called TimerConfigure.

    Best regards,
    Aslak
  • Hi Aslak,

    thank you for your swift response. What I am trying to do is to understand how to analyze the error the way you did, so that I do not have to consult you the next time I come across something similar. This is probably some very basic stuff but I hope you can elaborate a bit on it:

    Aslak N. said:
    The error is that you are trying to read from GTP0::CTL before that peripheral is turned on. Busfault address is 0x4001000C.

    How do you know it is a read and not a write?

    Aslak N. said:
    Based on the PC (0x10003672) it looks like the function that caused the issue is TimerConfigure() from driverlib in ROM

    How do you make the connection PC -> TimerConfigure()?

    Aslak N. said:
    You can find this if you load the driverlib.elf symbols via Run -> Load -> Add Symbols -> Browse -> <sdk>\source\ti\devices\cc13x2_cc26x2\rom\driverlib.elf and then look in the disassembly

    I am using ver 2.3 of the cc26x2 SDK. The folder devices holds the subfloder cc13x2_cc26x2_v1and cc13x2_cc26x2_v2. Which one is correct? When the symbols are added, do they persist to the next time I start CCS? How exactly do I look in the disassembly?

    Aslak N. said:
    Your LR is somewhere in Flash so I can't tell you what function called TimerConfigure.

    How do I do that? I know that LR is the link register that holds the return address of function calls but what do I make of this?

    Best Regards

  • Hi Hermann,

    Thank you for asking. Always happy to teach debugging. I was perhaps a bit brief.

    Your first screenshot was more helpful, as it shows the register contents at the time of the exception. This is stored by the CortexM itself, and displayed by ROV. In your last screenshot you show the current CPU state while you are in the exception handler. Usually not very interesting.

    I "knew" it was a read because it was a PRECISERR and I assumed you had not disabled write buffering (see debug chapter in the sw dev guide). Since write buffering is enabled by default you will I think always get IMPRECISERR because the exception happens after the program counter has moved on.

    The PC was an address in the 0x10million space, which is ROM. Since you were using 2.30 I assumed you were using the _v1 revision hardware and so I added the driverlib symbols to CCS, then used View -> Disassembly menu in CCS to look at that address (using the input box at the top to enter the address). Full disclosure, I also tried _v2 but that did not make sense.

    Now two things are pointing to GPTimer misuse; the busfault address, and the instruction at the excepting PC which is inside TimerConfigure(), and which is also a load instruction (read).

    You can look up the LR in disassembly view also. In addition, if the driverlib symbols are loaded before the failure, as well as the RTOS symbols (somewhere in <sdl>\kernel\tirtos\packages\ti\sysbios\rom\cortexm\cc26xx), the HWI ROV module will sometimes be nice and give you the entire call graph at the time of the exception. Usually you'd want to use the _Debug build configuration which puts TI-RTOS in Flash instead of ROM and adds some extra checks.

    The added symbols do not persist, but usually they remain in the recently used part of the Load menu, so you don't have to browse every time.

    Best regards,
    Aslak
  • Hi Aslak,

    I thought I already have TI-RTOS in flash. Atleast I am using the debug build configuration for the "app" project. Is there also a debug configuration for the "stack library" project? How can I make sure that TI-RTOS is running from flash? Because from what you say it looks like it does not. I dont see any rom options in ble_debug.cfg which is the active one at the moment.

    Best regards

     

  • Hi,

    You probably already do if you use the debug build, in which case you do not need to add RTOS symbols. If there is no ROM mentioned in the cfg file then it's in Flash. You should also not see any TI-RTOS functions at address 0x1001xxxx (ROM, RTOS area) in the map-file or when you step into them.

    Best regards,
    Aslak
  • The screenshots I posted were all made running the same build: (FlashROM_DEBUG configuration for project ble5_simple_peripheral_cc26x2r1lp_app). It looks like TI_RTOS is not in ROM, atleast the queue functions I checked on were placed much lower/earlier. This raises the question why the PC from the first screenshot has a target in ROM?

    I was wrong about my statement that there is no ROM mentioned in the ble_debug_cfg. There is one setting in specifc that I am wondering about:

    BIOS.libType = BIOS.LibType_Custom;
    //BIOS.libType = BIOS.LibType_Debug;

    Regarding the comment "Custom built library that is non-optimized that can be used to single-step through APIs with a debugger." I would assume it should be set to BIOS.LibType_Debug or is it only meant for TI engineers to debug TI-RTOS code? Also, is this BIOS and SYS/BIOS another notation for TI-RTOS?

    Best Regards