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.

For cc1310 Adding a Clock using cfg GUI



Hi All

I'm missing something.

I'm trying to add a clock from the available products to my project.

When I click on clock the cfg GUI opens up.  When I go to Instance there are no way to add any instances when I click on the add button. Also under overview clock does not show..... What am I missing?

When I'm in outline (Show configuration results) I can see the knl->clock->instance#0 is locked

Kind regards

Ben

  • Ben,

    I was able to graphically add a Clock instance. What version of TI-RTOS are you using? Can you try adding the following into the .cfg file (manually via a text editor...right click->Open with->Text Editor).

    var clock0Params = new Clock.Params();
    clock0Params.instance.name = "clock0";
    clock0Params.period = 5;
    clock0Params.startFlag = true;
    Program.global.clock0 = Clock.create("&foo", 2, clock0Params);

    Save the file/close and then look at the .cfg file in the graphical mode (right click->Open with->XGCONF). Do you see the Clock instance?

    What do you mean by locked? Can you add a snapshot? Also, can you attach your .cfg file (please attach and not copy/paste...it helps keep the thread readable).

    Todd
  • Hi Todd. Will give it a go tomorrow.  What I in the end did was to add the code manually

    Clock_Params_init(&clockParams);
    	clockParams.period = 300;
    	clockParams.startFlag = FALSE;
    	//clockParams.arg = (UArg)0x5555;
    	myClock = Clock_create(myHandler1, 0, &clockParams, NULL);
    	if (myClock == NULL) {
    	   System_abort("Clock create failed");
    	}
    Void myHandler1(void)
      {
           //Clock_tick();
    
           PIN_setOutputValue(ledPinHandle, LedState,!PIN_getOutputValue(LedState));
    	 PIN_setOutputValue(ledPinHandle, StateCount,!PIN_getOutputValue(StateCount));
    	 PIN_setOutputValue(ledPinHandle, EnableConfig,!PIN_getOutputValue(EnableConfig));
    
           PIN_setOutputValue(ledPinHandle, Board_LED3,!PIN_getOutputValue(Board_LED3));
           //Clock_stop(myClock);
           radio_Status++;
           if(radio_Status>5)
           {
        	   Clock_stop(myClock);
        	   PIN_setOutputValue(ledPinHandle, LedState,0);
        	   PIN_setOutputValue(ledPinHandle, Board_LED3,0);
        	   radio_Status=0;
           }
      }

    And this worked.

  • I'm going to mark this as Verified. Please feel free to add any additional information on why you could not do this graphically.

    Todd