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.

Using Timer_B7 on an MSP430f2618 with SYS/BIOS



I am trying to use the B7 timer of the 'F2618.  The configuration code (in a file named idle.cfg) is:

var eventTimerParams = new Timer.Params();
eventTimerParams.period = 1000;
eventTimerParams.periodType = Timer.PeriodType_MICROSECS;
eventTimerParams.arg = 1;
eventTimerParams.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
var eventTimer = Timer.create(3, '&eventTimerISR', eventTimerParams);

gives me this error message:

Description	 Resource	Path	 Location	 Type
Invalid Timer ID: 3; the id must be -1, 0, ..., 1 idle.cfg /RefBrd ti.sysbios.family.msp430.Timer.Instance#1 XDCTools Configuration Marker

I am using the following tools:

CCS Version 5.1.0.0900
SYS/BIOS: 6.33.1.25
XDCtools: 3.23.0.32 

Based the Bios User Guide, I expected IDs 0-2 to be Timer_A and IDs 3-9 to be Timer_B.

I also want to use this timer with ACLK/8. Can I express this in the configuration file or do I have to write code to update TBCTL?

Regards,

Fred

  • Hi Fred,

    The timer ID refers to a complete physical timer.  On the F2618 there are only two timers, one a Timer_A3, (a Timer_A, with 3 capture/compare channels), and one a Timer_B7 (a Timer_B with 7 capture/compare channels).  So, this error is to be expected - you cannot create more than two SYS/BIOS Timers for this device. 

    If you want to create multiple timeouts based upon a single physical timer, you can use Clock objects for this (see section 5.2 in the user’s guide).

    And yes, if you want a different divide ratio for ACLK, you’ll need to modify the control register directly; there is no way to specify this via SYS/BIOS configuration.

    Scott