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.

Task, HWI, SWI

Other Parts Discussed in Thread: SYSBIOS

Can i call Task_disable(), Swi_disable(), Hwi_disable() from Idle task.

  • Hi MSR,

    Yes, any of these functions can be called from the idle Task (which is just Task context).

    You can find function calling tables for all of the BIOS modules in the BIOS API documenatation.

    Steve

  • When i use these functions in idle task DSP going to abort state...

    here is the flow

    ......

    task_disable()

    flashprogramming() it contains nor flash erase and write frunctions

    task_enable()

    ...............

    after that it is going to abort state but the thing is flash erase and write is done perfectly.

  • MSR,

    Have you tried using Hwi_disable()/Hwi_enable() around the flash programming function? 

    Task_disable() will not disable interrupt processing, and I wonder if that is a requirement for your flash programming routines?...

    Scott

  • Scott,

    my requirement is flash programming in critical section so that i am doing like this

                Task_disable();
                Swi_disable();
                Hwi_disable();
                flashImageBurn();
                Hwi_enable();
                Swi_enabled();
                Task_enable();

    after this it is going to abort state.

  • MSR,

    If you are doing the Hwi_disable()/Hwi_enable() then you don’t need to disable/enable the Task or Swi schedulers too.  Because no interrupts could be serviced, which would be needed to trigger the Task or Swi schedulers to run.

    The thing to do is to dig into the flashImageBurn() function to see what it is doing.  For example, might it be overwriting a block of Flash that the application is currently using?  Does it change hardware settings (clocks, voltages) that affect the rest of the application?  Can you step into the function with the debugger and make sure it is not doing anything that corrupts current application state?

    Also, if you set a breakpoint on the Hwi_enable() after the return from flashImageBurn(), and then look at application state with the ROV tool, do you see any errors?  For example, maybe the Idle task stack overflowed?

    Scott

  • Hi,

    This is the console data when system on abort state.

    [C674X_0] 23=0x0
    B24=0x7d40cb14 B25=0xf6dbdda
    B26=0x46 B27=0x5d
    B28=0x0 B29=0x1183029a
    B30=0x1182e250 B31=0x11816c20
    NTSR=0x1020c
    ITSR=0x20f
    IRP=0x11811d2c
    SSR=0x0
    AMR=0x0
    RILC=0x0
    ILC=0x0
    Exception at 0x14
    EFR=0x2 NRP=0x14
    Internal exception: IERR=0x1
    Instruction f[C674X_0] etch exception
    ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x11811d2c, sp = 0x11830260.
    To see more exception detail, use ROV or[C674X_0]  set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
    xdc.runtime.Error.raise: terminating execution

    ...............................................

    when it is returning from flashImageBurn() function it is going to "No source available for "abort() at 0xc0012160" " like this it is showing. Observation in  ROV tool is no change.

  • stack is not overflow for all tasks

  • Hi MSR,

    You need to use the register dump to see where the exception happened.

    Please refer to this FAQ item which explains how to do that.

    Steve