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.

SYSBIOS & STARTERWARE

Other Parts Discussed in Thread: SYSBIOS, OMAPL138

Hi,

I want to know if it's possible to create HWI or task with STARTERWARE and to be able to see it in the SYSBIOS outline. Exemple, when i create a HWI for the usb (usb_dev_bulk) i can't see it on the SYSBIOS, the interrupt work fine but if i go to the ROV the HWI is not present.

Thanks

i use SYSBIOS 6.33.04.39 and STARTERWARE 1.10.02.02

  • Vincent St-Pierre,

    Unfortunately, ROV is only supported for SYS/BIOS modules.  It does not support other OSes (or "non OSes" such as starterware).

    However, if you update your program to use SYS/BIOS and create and configure a new Hwi instance, you will be able to see it in ROV.

    Steve

  • Hi Steve,

    Thanks for you quick answer.

    I got a another question for you. I dont know if you know a little about Starterware but i got no answer form the Starterware forum. Here is my problem:

    I create a HWI for the USB (i modified usb_dev_bulk.c, i remove the LCD part) but when i use this code, it deactivate the interrupt of timer use for the ti_sysbios_knl_Clock_doTick__I (intNum=14). So when i use the task_sleep in my task the software stop working on task_sleep. The problem is that the interrupt for the timer is create automatically when i use BIOS_START();. I try to change the timer use for the Clock_doTick but it doesn't work. I try to find how i can restart the timer but no success. I can tell the timer is not running because the counter is always 0.

    thanks

    Vincent

  • Hi Vincent,

    You can configure the Clock module to use a different timer.  (The Clock is driven by a Timer interrupt underneath).

    Here's a snippet from the SYS/BIOS API documentation for the Clock module (found via CCS help):

    By default, the Clock module statically configures a ti.sysbios.hal.Timer timer instance to provide the periodic 1 ms tick interrupt. If you want to use a custom configured timer for the Clock module's tick source, use the following example configuration as a guide :
     var Clock = xdc.useModule('ti.sysbios.knl.Clock'); // Tell the Clock module that YOU are providing the periodic interrupt Clock.tickSource = Clock.TickSource_USER; // this example uses the ti.sysbios.timers.dmtimer.Timer module var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer'); // create a dmtimer config parameter object var timerParams = new Timer.Params(); // make sure you set the period to 1000 us (1ms) timerParams.period = 1000; // custom dmtimer config parameters here... timerParams.twer.ovf_wup_ena = 1; // Create the timer. // This example uses timer id 3. // The timer interrupt handler must be set to 'Clock.tick'. Timer.create(3, Clock.tick, timerParams);
    

    You can use the Timer mapping tables, found in the SYS/BIOS API reference for the Timer module.  In there you will find a timer mapping table, which maps Timer ID numbers to actual timers.  You can also see their corresponding interrupt numbers in the timer table that's found in the Timer.xs file or hardware documentation for your platform.

    Steve

    Steve

  • Hi Steve,

    I try to use the dmtimer like you suggest me, i got a error that said "Timers unsupported on device" i dont know if the omapl138 does support dmtimer...

    I do some test, with SYSBIOS using the ti.sysbios.timers.timer64.Timer:

    1-Changing the core for the timer (I try 0 and 1)

    2-Changing the Clock.timerId (I try 0,1,2,3)

    All this test fail...

    I think the problem is the usb_dev_bulk code from the starterware but i cant find what is the cause of this problem.

    If the usb_dev_bulk create and use a timer and this timer is not create in the sysbios, it is possible that the sysbios can't controle any more the timer use for the doTick? And if the timer create by the usb_dev_bulk is create after the sysbios is start (BIOS_start) what going to happen?

    Do you know some one who use the usb_dev_bulk with the sysbios?

  • Hi Steve,

    I find that when i use the IntDSPINTCInit(); in my usb_dev_bulk its disabled all interrupts, you can see the comment from the file who define the function:

    /**
    * \function IntDSPINTCInit
    *
    * \brief This API is used to setup the DSP Interrupt Controller (INTC)
    * and should be called before using the DSP INTC. All CPU
    * maskable interrupts will be disabled after calling this API and
    * the user should proceed to setup the required interrupts for
    * processing.
    *
    * \param None
    *
    * \return None
    */
    
    

    So I think I need to enable the interrupt who controle the doTick, after I initialize my usb. But i not sure how to do this. I try function like this Hwi_enableInterrupt(14); but with no success. Can you give my some direction that will help me to do this.

    Thank

    Vincent

  • Vincent,

    In my previous reply, I tried to paste some example code but realized I didn't paste everything.

    The following is an example of how to reconfigure the clock:

      var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    
      // Tell the Clock module that YOU are providing the periodic interrupt
      Clock.tickSource = Clock.TickSource_USER;
    
      // this example uses the ti.sysbios.timers.dmtimer.Timer module
      var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
    
      // create a dmtimer config parameter object
      var timerParams = new Timer.Params();
    
      // make sure you set the period to 1000 us (1ms)
      timerParams.period = 1000;
    
      // custom dmtimer config parameters here...
      timerParams.twer.ovf_wup_ena = 1;
    
      // Create the timer.
      // This example uses timer id 3.
      // The timer interrupt handler must be set to 'Clock.tick'. 
      Timer.create(3, Clock.tick, timerParams);

    The dmtimer doesn't exist on the OMAPL138.

    Furthermore, it sounds to me like there is a resource conflict between BIOS and the USB APIs that you are calling (like they are reconfiguring or hijacking the timer from BIOS ...)

    Steve
  • Hi Steve,

    Steven Connell said:
    // custom dmtimer config parameters here... timerParams.twer.ovf_wup_ena = 1;

    timer64 have no twer (WakepUp Enable Register)...

    Steven Connell said:
    Timer.create(3, Clock.tick, timerParams);

    Clock.tick or Clock.doTick?? because i got error with Clock.tick

    Thanks

    Vincent

  • In the ROV, when I select Hwi, the column irp. What is irp?

    Because when I put the code for the USB (usb_dev_bulk) this value is always 0x0000000:

    And when the code for the USB not there the value change when I step through the first sleep of my task the value change. I dont know if its mean something....


  • The IRP is the "Interrupt Return Pointer".

    It is the address of the instruction that the most recently handled interrupt returned to after the Hwi function was invoked.

    A value of ZERO usually means that the interrupt has never occurred.

    I'm not familiar with STARTERWARE but I suspect that there is contention between the USB driver's usage of an interrupt and SYS/BIOS usage of an interrupt.

    Alan

  • Ok ty,

    No one can help me for my main problem?

    Thanks

  • Ok ty

    Now no one can help my for my main problem?

  • Ok ty,

    Some one can help me for my main problem?

    Thanks

  • Ok, ty for this answer,

    Now can some one help my with my main problem pls.

    Thanks

  • Vincent,

    I am working with the Starterware folks to see what we can do about this issue.  We will post back to this forum as soon as we have an  update for you.

    Steve

  • Hi Steve,

    I will wait for the update.

    Until the next update, I try to do the usb bulk communication without the SYSBIOS its work but I want to create some task, can i create task (like threadX) without SYSBIOS???

    Thanks

  • Hi Steve,

    Just to inform you team that i got the same problem when I try to do use the UART from the Starterware and the sysbios. I think that is how you are manage the interrupt in the starterware is in conflic with the sysbios.

    Thank

    Vincent

  • See section 7.1 in the SYS/BIOS user guide: http://www.ti.com/lit/ug/spruex3m/spruex3m.pdf

     This may explain your issue.