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.

IWR1843BOOST: IWR1843BOOST

Part Number: IWR1843BOOST

Hi,

as I'm having some difficulties with TASKS (in a separate question), I've had  a look at Hwi & Swi.

I've managed to add code (based on BIOS docs), and this compiles OK.  However, at the point where the Hwi or Swi is CREATEd, I get a run-time error:

{module#35}: line 505: error {id:0x10000, args:[0x1aca0, 0x1aca4]}
xdc.runtime.Error.raise: terminating execution

> Is there something else that I still need to add to the code for this to work?  My code is based on the oob_demo, which I don't think uses Hwi or Swi.

I'd like to try using a Swi to do the "less important" processing in an ISR ... which seems to be what they're for, according to the video tutorial.  I'd like to see how this does, as oppose to the ISR setting a flag, which a separate TASK then monitors, to run the other code.

On Hwi: the BIOS docs talk about "attaching" a Hwi to an actual system hard-ware interrupt (3.4.1).  Alternatively, I could "SOC_registerSysIntListener" a routine to run the ISR (as I have done, and works OK).  Any reasons I should use one method or the other? Just for completeness, I've been using this with the CHIRPAVAIL interrupt.

many thanks

Alan Milne

  • Hi Alan,

    Can you put the device in debug mode and recreate? This may yield a more descriptive error message.

    https://dev.ti.com/tirex/explore/node?a=1AslXXD__1.00.00.26&node=A__AKZl2I1OiS5ssBNGpidsCQ__radar_toolbox__1AslXXD__1.00.00.26

    Best,

    Nate

  • Hi Nathan,

    thanks for the reply - I've FLASHed the  18xx CCS debug code as requested (it had ood_demo in there).  This doesn't seem to do anything different i.e. the message in CCS is just the same, so that doesn't  seem to help me help you, if you see what I mean.

    Let me know if there's anything else you'd like me to try.

    thanks

    Alan

  • Hi Alan,

    Perhaps you can share the code snippet with us where you create the SWI?

    Best,

    Nate

  • Hi Nate,

    certainly - lifted from the BIOS_USER_GUIDE.  I've included the code round-about, so you can see here I've put it and whether anything around affects things.  The doc is my only source - oob_demo doesn't use Hwi or Swi that I know, there may be examples I could follow in other SDK code?  I've included the Hwi bits too - simply experimenting with the chirpAvail interrupt, as I know that's working as an ISR registered with the system.

    in MmwDemo_initTask:

    /*****************************************************************************
    * Initialize the CLI Module:
    *****************************************************************************/
    MmwDemo_CLIInit(MMWDEMO_CLI_TASK_PRIORITY);
    
    
    /*****************************************************************************
    * create Hwi for extSync function :: this compiles, but crashes at run time
    *****************************************************************************/
    // Hwi_Handle hwiChirpAvail;
    // Hwi_Params hwiParams;
    // Error_Block eb;
    // Error_init(&eb);
    // Hwi_Params_init(&hwiParams);
    // hwiParams.arg = 5;
    // hwiExtSYnc = Hwi_create(id, hwiFunc, &hwiParams, &eb);
    // hwiChirpAvail = Hwi_create(SOC_XWR18XX_MSS_CHIRP_AVAIL_IRQ, chirpAvail_Hwi, &hwiParams, &eb);
    // if (hwiChirpAvail == NULL)
    // {
    // System_printf("\nchirpAvail_Hwi FAIL\n");
    // }
    // else
    // {
    // System_printf("\nchirpAvail_Hwi success\n");
    // }//end of "if (hwiChirpAvail == NULL)"
    
    /*****************************************************************************
    * Initialize the SampleCollect Module:
    *****************************************************************************/
    sampleCollect_TaskInit();
    
    /*****************************************************************************
    * create Swi for sampling Block server
    *****************************************************************************/
    //xx
    // Swi_Handle swi_0;
    Swi_Params swiParams;
    Error_Block eb;
    Error_init(&eb);
    Swi_Params_init(&swiParams);
    // swi_0 = Swi_create(sampleCollect_samplingBlockServerSwi, &swiParams, &eb);
    // if (swi_0 == NULL)
    // {
    // System_printf("\nswi_0 ERROR\n");
    // }
    // else
    // {
    // System_printf("\nswi_0 SUCCESS\n");
    // }//end of "if (swi_0 == NULL)"
    
    
    /*****************************************************************************
    * Launch the samplesCollect extSync execution task
    * - This should have a next highest priority to MmwDemo_mmWaveCtrlTask
    *****************************************************************************/
    Task_Params_init(&taskParams);
    taskParams.priority = MMWDEMO_SAMPLECOLLECT_EXTSYNC_TASK_PRIORITY;
    taskParams.stackSize = 4*1024;
    gMmwMssMCB.taskHandles.extSyncTask = Task_create(sampleCollect_extSyncTask, &taskParams, NULL);
    System_printf("\nsampleCollect_extSyncTask started\n");

    Lots is commented out here - just because this is my working code, so I have to get on with other things while learning about Hwi & Swi.

    sampleCollect_samplingBlockServerSw is pretty much the same code as I sent before, just a different name so I can experiment with them separately.

    NB sampleCollect_TaskInit(); just initializes counters, it doesn't do anything with Hwi, Swi etc.

    many thanks

    Alan

  • Hi Alan,

    Does the error here occur on line 40? Just trying to understand a bit better what you're saying.

    Best,

    Nate

  • Hi Nate,

    no, I think its when the CREATE is issued, line 41.

    Further: I've been looking at this again, and I may have (accidentally) found part of the problem - at least where Hwi is concerned.

    It appears (can't point to anything in the docs to back this up: BIOS & 522e) that it depends on what you do with which interrupt:

    SOC_registerSysIntListener works with the SOC_XWR18XX_MSS_CHIRP_AVAIL_IRQ but not with SOC_XWR18XX_MSS_GPIO1_INT (not the right kind of system interrupt?).

    However, the reverse is true when try to setup an Hwi_create: now, I've got the GPIO one working all the way through - but the chirpAvail on causes the run-time error. I only chose that one because I was already working with it!

    So - so far as Hwi errors are concerned, it's my fault for using the wrong setup i.e. which method I use for which h/w interrupt.  It would be nice, if you know where to find it, where in the docs it tells me about this i.e. which interrupt ought to be set up with which method - as said, this is by experimentation rater than knowing its really what's going on.

    Swi is still a problem, though - haven't found a similar mistake to solve that one.  Currently, while working on the rest, I've got it in the code: all there except the CREATE line & test there after, hence why I say it's line 41 above that causes the error.

    many thanks

    Alan

  • Hi Alan,

    Unfortunately I cannot continue to help you debug. This forum is not meant for application development at this depth. You are welcome to consult our documentation, but I think you'll need to dive deeper into SWI's and the RTOS to figure this one out.

    Good luck!

    Nate

  • Hi Nate,

    I entirely understand! I know I'm well away from what the device was designed for.  In my defence, I am trying to develop technology using TI devices - its research at this stage so nothing is certain but, if successful, I could open up a whole new application area for TI.

    However, these questions are to do with RTOS, rather than the 1843 itself.  Before I close this, can you tell me if there is a similar e.g. E2E for the RTOS?

    many thanks

    Alan

  • Hi Alan,

    Not that I know of, but you could consider digging through the SDK to try to find an example of the SWI you're looking for here. Good luck!

    Best,

    Nate

  • Hi Nate,

    yes, been trawling through docs & SDK contents etc - much of R&D engineering is detective work!

    Alan