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.

BIOS_start() causes the MCU to halt?

Other Parts Discussed in Thread: SYSCONFIG, LAUNCHXL-CC26X2R1, SYSBIOS, TIMAC

Hi,

I'm using a CC2652 MCU and attempting to upgrade TI SDK from 3.40 to 6.10 and I've got the code to build at last. I use the XDCtools that came with CCS 11.20, 3.62.1.16 and I have no references to TiRTOS 7 so I assume I stick with TiRTOS 6? I've only made minor adjustments to the application code.

When I run the code on target using an XDS200 I get the following output when hitting BIOS_start();
Cortex_M4_0: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.7.0.00213)
Cortex_M4_0: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.7.0.00213)
Cortex_M4_0: JTAG Communication Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.7.0.00213)

I can step through all the preceeding steps in main() but I end up with the error above when I step over BIOS_start(), or click run. My configuration may be doubtable but even if I comment out all function calls in main() I still end up with these errors.
The Target Configuration -> Test Connection works perfectly.

It seems to me that the MCU halts and somehow kicks out the JTAG.

How can I fault trace this? All ideas are welcome!

  • Hi Martin,

    Your device could be crashing which breaks the JTAG debug connection.  Are you using a RF stack solution, and have you referenced the corresponding Migration Guide?  Here is an E2E post which covers the benefits of using TI-RTOS7, which will fully replace TI-RTOS6 after v6.20 of the SDK (see this other E2E reference).

    Regards,
    Ryan

  • Thank you Ryan,
    I'm using the ti154stack solution. Thanks for the Migration Guide link. Unfortunately I can't see how this is related? Even though I comment out all GPIO-related code before BIOS_start() in main() I still end up with the error messages posted above.

    While I understand there are several features in TiRTOS 7 that I can benefit from, I assume it is not mandatory to upgrade to TiRTOS 7 for TI SDK 6.10?

  • Thank you Zain,

    That thread seems to address some hardware-related issues and/or bad clock configurations. Unfortunately this is not the case here. My hardware runs perfectly on TI SDK 3.40 and should (?) do the same for 6.10.

  • From your previous E2E thread I am concerned that you are attempting to modify project settings/files from 3.40 to adopt the 6.10 SDK instead.  Several Predefined Symbols, SysConfig settings, and other Project Properties have changed since then, and an incorrect combination may build but then cause run-time issues.  Please start with a default v6.10 SDK example using the dependencies listed in the Release Notes.  Then start adding your application-specific changes, perhaps incrementally to further determine which part causes the issue.

    Regards,
    Ryan

  • Thank you Ryan.

    Yes, you are correct. I understood that modify project settings was a way forward based on: "You could also use this as a diff compare between project settings to determine what is different inside the Project Properties". I prefer this way over adding my application to a default project as chances are that I miss something crucial.

    Anyhow, I did as you suggested, that is, started with a default 6.10 project and added my application to it. Still I end up tampering with various project settings as none of the example projects (ti154stack) are 1:1 with my base setup. For example, they are all configured for a different target, they all include SysConfig which is not part of my original project. Also, I have XDCtools (3.62.1.16) but it is missing in all the example projects.

    Now I've ended up in a situation where the TI SDK doesn't recognize the device family (DeviceFamily_XYZ undefined. You must define a DeviceFamily_XYZ!), even though it is clearly defined in Arm Compiler / Predefined Symbols.

    As another attempt I started off with the collector_CC26X2R1_LAUNCHXL_tirtos7_ccs example, downloaded the SysConfig GUI (1.12.1_2446), trying to change the General / Variant and core settings. The SysConfig cannot open the collector.syscfg: "Cannot specify --board without --product".

    I'm sorry if this post mostly sounds like complaining but I can't see how I can proceed?


    Thanks.

    Best Regards,
    Martin

  • What device variant are you trying to use?  There should be a project for your needs or a Migration Guide available.  You can effectively remove most SysConfig functionality by going to "Show Generated Files" and de-selecting the "Include in Build" button.

    Regards,
    Ryan

  • Thanks Ryan.

    I'm using a CC2652R1F. The example projects show a CC2642R1F under project settings but a CC2652R1F is configured in the corresponding SysConfig settings, so it's a bit confusing.

    It seems to me that there is no way to inherit the existing configurations to a 6.10 project? The Migration guide instruct me to

    • Choose “Start a new Design”
    • Add an RF stack
    • Add any TI Drivers configuration
    • ...
    • Remove the board files

    In my opinion this is not a migration, it's a "Start from scratch" approach, with a great risk of missing something crucial.

    Anyway, let's say the example project collector_CC26X2R1_LAUNCHXL_tirtos7_ccs matches my existing hardware setup (which I have no way of verifying), how to do with XDC tools? The Migration guide states "XDC Tools, and the dependent kernel project are no longer needed". Any idea what I do with all xdc references throughout my application?

    Again, I'm sorry if this post mostly sounds like complaining but I can't see how I can proceed?

    Thank you for your support!

  • The CC2642R1F and CC2652R1F are binary-compatible so you should be able to use any LAUNCHXL-CC26X2R1 project.  I agree that the "Start from scratch" approach is not ideal, and I will try to help answer any questions you might have concerning the new environment.

    TI-RTOS7 does not require XDC Tools, which should not affect your application files at any rate.  Here is more information about TI-RTOS7, which is also captured in the SDK Release Noteshttps://e2e.ti.com/f/1/t/1050744 

    So you should be able to import a collector_CC26X2R1_LAUNCHXL_tirtos7_ccs project which is compatible with the CC2652R1F, then migrate any application changes you've made to the previous SDK version project.  I need an example of XDC references through your application to further help with that specific concern.

    Regards,
    Ryan

  • Thank you again Ryan.

    I'm not perfectly confident with my hardware setup, that's why I wanted to inherit the configuration from my board files. Anyway, I'm attempting to configure the hardware using the SysConfig tool.

    Regarding XDC, my application has implemented xdc_runtime_Log_print functions. Are there any equivalent to be used for TiRTOS 7?

    #define xdc_runtime_Log_print1(mask, fmt, a1) \
    ( (Module__LOGDEF == TRUE && xdc_runtime_Diags_query(mask)) ? \
        xdc_runtime_Log_doPut2(mask, Module__MID, (IArg) fmt, (a1)) : (void)0 \
    )
    

  • Hi Martin,

    There is a TI-RTOS to TI-RTOS7 Migration Guide in the 15.4-Stack Migration Guide, and TI-RTOS7 resources in the Documentation Overview.  Have you tried setting BIOS.logsEnabled = true; from the SysConfig file (using the text editor) and otherwise considered using other Debug Printing solutions?

    Regards,
    Ryan

  • Thank you Ryan,

    I'm following the TI-RTOS to TI-RTOS7 migration guide, specifically "You will need to take your existing .cfg file and translate it into content to add to your .syscfg". My approach is to go through my .cfg file and find the equivalent setting in the SysConfig GUI and enter the same settings there. Maybe I'm doing something wrong but there are several modules and/or settings that I can't find in the SysConfig GUI, for example:

    Timestamp.SupportProxy = xdc.useModule('ti.sysbios.family.arm.cc26xx.TimestampProvider');
    Error.policyFxn = Error.policyDefault;
    Error.raiseHook = Error.print;
    Error.maxDepth = 2;
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
    var ROM = xdc.useModule('ti.sysbios.rom.ROM');

    I don't find any equivalent in the documentation overview either. Am I on the wrong track?

    I will look into the debug printing possibilities.

    Regards,

    Martin

  • Some settings, such as Runtime-> Error Handling and HAL -> Boot/Timestamp, are found under the TI RTOS settings of the SysConfig GUI.  More detailed changes are accessible by modifying the SysConfig file directly with a Text Editor.  Right click on the SysConfig file in CCS -> Open With -> Text Editor to view the format you are more familiar with and observe what the default settings are.

    Regards,
    Ryan

  • So I've gone through my .cfg file and tried to find the corrsponding settings in SysConfig. I have discovered the following:

    1. Some settings are hidden in text-mode, for example, set Hwi.NUM_INTERRUPTS to 53 there is a corresponding line in text-mode:
      Hwi.numInterrupts  = 53;
      If set to 54 the line is missing (I assume 54 is some kind of default number and therefore the text gets hidden). This makes the text file inconsistent and practically unusable since some settings are not visible at all times.
    2. It seems the GUI is the base and the text is the output from the GUI. I can only add changes in text-mode as long as it can be interpreted by the GUI. My .cfg file contains if-conditions, which are not interpreted by the GUI, is there a way to set conditional settings using SysConfig?
      if( Program.global.INTERFACE_USED_FOR_LOGGING == Program.global.LOG_INTERFACE_UART )
      {
          Program.global.UHF_UART_ENABLED = true;
          // Pull in LoggerCallback
          var LoggerCallback = xdc.useModule('xdc.runtime.LoggerCallback');
          // Tell LoggerCallback to call our output function
          LoggerCallback.outputFxn = "&debugLogOutputFxn";
          // Create a static instance of LoggerCallback and set as default Main logger
          var loggerParams = new LoggerCallback.Params();
          loggerParams.arg = Program.global.LOG_INTERFACE_UART;
          Main.common$.logger = LoggerCallback.create(loggerParams); // Only for Main (code that's not in an rtsc module)
      }
      else // fetching log messages via JTAG
      {
          Program.global.UHF_UART_ENABLED = false;
          var LoggerSys = xdc.useModule("xdc.runtime.LoggerSys");
          var LoggerSysParams = new LoggerSys.Params();
          Main.common$.logger = LoggerSys.create();
          Main.common$.diags_USER6 = Diags.ALWAYS_ON;
      }
    3. There are new settings in SysConfig which I don't know how to deal with. Maybe some of them have a new name and to match them this involves guessing and assumptions, which is not a way forward, I must know if the settings are correct or not.
    4. There are numerous modules and settings missing in both the GUI and text-file and I don't know how to proceed with these.
       -- Modules --
          Defaults
          ROM
          Text
          Types
          Diags
          Log
          Main

       -- Settings --
          Timestamp.SupportProxy
          Error.policyFxn
          Error.raiseHook
          Error.maxDepth
          Hwi.checkStackFlag
          Hwi.enableException
          Hwi.nvicCCR.UNALIGN_TRP
          Hwi.resetVectorAddress
          Hwi.vectorTableAddress
          BIOS.libType
          BIOS.includeXdcRuntime
          BIOS.runtimeCreatesEnabled
          BIOS.logsEnabled
          BIOS.rtsGateType
  • I highly recommend you read through the sections that cover SysConfig in the SYS/BIOS (TI-RTOS Kernel) v7.x User's Guide.

    You can edit the .syscfg file using a text editor outside SysConfig. However, SysConfig performs checking to prevent inconsistencies and conflicts. Therefore, it is recommended that you use the SysConfig interface to configure applications unless you are experienced with the generated configuration files

    I thing you are assuming that all TI-RTOS6 modules/settings exist on TI-RTOS7 as well, which is not true.  If you are adopting TI-RTOS7 then some of these may not be available, whereas others are still accessible in ti_sysbios_config (ex. Error.raisHook is Error_raiseHook_D)

    Regards,
    Ryan

  • Thanks Ryan,

    I understand the concept of SysConfig. What I don't understand is how to configure my target when some modules/settings are no longer available? I can't find any information about this on TI website or documentation.

  • What do you mean by configuring your target?  Can you please give me a specific example of a feature which is critical to your project and yet you cannot figure out how to enable it with TI-RTOS7?

    Regards,
    Ryan

  • All the settings and modules I listed above are missing in SysConfig but exist in my .cfg file, so I assume they are needed. I can't afford losing functionality by upgrading to a later SDK version.

    A specific example could be the ROM module. I have -DTIMAC_ROM_IMAGE_BUILD in my defines.opt so I do need the ROM module.

  • TI-RTOS7 is intended to be more intuitive by removing the need for specific .cfg file changes as with TI-RTOS6.  TIMAC_ROM_IMAGE_BUILD means the project will use the MAC image stored in ROM, this is used for 15.4-Stack projects regardless of TI-RTOSx settings.

    If adopting TI-RTOS7 is too difficult for your project then you could instead upgrade to an SDK which retains TI-RTOS6, v5.30 for example is the latest instance using TI-RTOS6 with TI 15.4-Stack: https://www.ti.com/tool/download/SIMPLELINK-CC13XX-CC26XX-SDK/5.30.01.01 

    Regards,
    Ryan

  • Thanks Ryan,

    I switched to SDK 5.30 as you suggested, added my application to the collector_CC26X2R1_LAUNCHXL_tirtos_ccs example project. Still I get the same runtime error as in the first post in this thread:

    Cortex_M4_0: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.7.0.00213)
    Cortex_M4_0: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.7.0.00213)
    Cortex_M4_0: JTAG Communication Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.7.0.00213)

    I will not work on this for about three weeks now, I'll catch up in mid August again.
    Thank you for your support so far.

  • Hi Martin,

    This behavior indicates that it is not an issue with the RTOS version.  You should further debug your application to determine what lines of code or functionality causes this issue to occur.  You can also test against a LAUNCHXL-CC26X2R1 or consider whether the problem exists due to your XDS200 interface (i.e. whether the project runs without the debugger connected).

    Regards,
    Ryan