Pumpkin, Inc.

Pumpkin User Forums

Reset during OSSched()

If you can't make Salvo do what you want it to do, post it here.

Reset during OSSched()

Postby pk » Sun May 14, 2006 1:27 am

I am using ICC430 (v6.06) and the Salvo Tiny that comes with it to drive a MSP430F149. After calling OSSched() I can single step in the debugger and watch the OS clear the WDT, but the chip gets reset after executing about 30 - 40 lines of assembly.

The ISR that controls most of the semaphores is called at 1s intervals.

None of my tasks gets started (I turn on a LED in the first line of each).

It is probably a simple mistake, but I can't see it. Anyone have any ideas?

Thank you very much.

Here are some sections of my code:

#include <msp430x14x.h>
#include <math.h>
#include <msp430def.h>
#include <string.h>
#include <salvo.h>

_OSLabel(TaskUpdateVFD1)
_OSLabel(TaskUpdateVFD2)
_OSLabel(TaskUpdateDAC)
_OSLabel(TaskRxUART)
_OSLabel(TaskTxUART)
_OSLabel(TaskUpdateRelays)
#define BINSEM_UpdateDAC OSECBP(1)
#define BINSEM_UpdateVFD1 OSECBP(2)
#define BINSEM_UpdateRelays OSECBP(3)
#define BINSEM_TxUART OSECBP(4)
#define BINSEM_RxUART OSECBP(5)

void main(void)
{
Init();
OSInit();

OSCreateTask(TaskUpdateVFD1, OSTCBP(1),5);
OSCreateTask(TaskUpdateVFD2, OSTCBP(2),5);
OSCreateTask(TaskUpdateDAC, OSTCBP(3),5);
OSCreateTask(TaskRxUART, OSTCBP(4),5);
OSCreateTask(TaskTxUART, OSTCBP(5),5);
OSCreateTask(TaskUpdateRelays,OSTCBP(6),5);

OSCreateBinSem(BINSEM_UpdateDAC, 0);
OSCreateBinSem(BINSEM_UpdateVFD1, 1);
OSCreateBinSem(BINSEM_UpdateRelays, 0);
OSCreateBinSem(BINSEM_TxUART, 0);
OSCreateBinSem(BINSEM_RxUART, 0);

OSEi();
InstMode4 |= SplashDone;
for(;;) OSSched();
}

void port1ISR(void) //Port 1 ISR
{
if (P1IFG & OneHz) //One Hz from RTC
{
TACTL &= ~(MC0 + MC1); //stop TA
TBCTL &= ~(MC0 + MC1); //stop TB
Ch0rec[0] = Ch0rec[0] + (float)TAR;
Ch1rec[0] = Ch1rec[0] + (float)TBR;
TACTL |= MC1;
TBCTL |= MC1;
TACTL |= TACLR; TBCTL |= TBCLR;
OSTimer(); //increment OS timer

if (InstMode4 & SplashDone)
OSSignalBinSem(BINSEM_UpdateRelays);
if ((OneSucount == IntPeriod)&&(InstMode4 & SplashDone))
{
OSSignalBinSem(BINSEM_UpdateDAC);
OSSignalBinSem(BINSEM_UpdateVFD1);
OSSignalBinSem(BINSEM_TxUART);
}
P1IFG &= ~OneHz; //clear flag
}
}

void TaskUpdateVFD1(void) //a typical task
{
for (;;)
{
P3OUT |= LED1;
OS_WaitBinSem(BINSEM_UpdateVFD1, OSNO_TIMEOUT, TaskUpdateVFD1_1);
// do some stuff.....
OS_Yield(TaskUpdateVFD1_2);
//do some stuff
}
}

pk
 
Posts: 3
Joined: Sat May 13, 2006 11:00 pm
Location: Annapolis, MD 21403

Re: Reset during OSSched()

Postby aek » Sun May 14, 2006 9:06 am

The problem you're seeing is due to a change in ImageCraft's ICC430 compiler that required new Salvo libraries -- see http://www.pumpkininc.com/salvo/lite/msp430/3.2/versions.txt for an explanation.

I don't think we've released a new Salvo tiny library for ICC430 v6.06 and higher -- I'll check on Monday and if so post it to the tiny download area.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Reset during OSSched()

Postby aek » Mon May 15, 2006 7:56 am

We have in fact released the approproate Salvo tiny library be sure to download and install the 3.2.4-c.zip patch that's in the download area ...

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Reset during OSSched()

Postby pk » Mon May 15, 2006 9:13 am

Aek -

Thanks for getting back to me about this.

I will try the patch, but how do I get into you download area? It is not clear (to me) from your website where it is.

pk

pk
 
Posts: 3
Joined: Sat May 13, 2006 11:00 pm
Location: Annapolis, MD 21403

Re: Reset during OSSched()

Postby aek » Mon May 15, 2006 9:25 am

I think most people get to it through the link in About ... in ICC430 ...

Direct link:
http://www.pumpkininc.com/salvo/tiny/msp430/icc430/3.2/

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Reset during OSSched()

Postby pk » Thu May 18, 2006 5:42 am

Aek -

Thanks for your help. I am up & running now.

pk

pk
 
Posts: 3
Joined: Sat May 13, 2006 11:00 pm
Location: Annapolis, MD 21403


Return to Coding

Who is online

Users browsing this forum: No registered users and 0 guests

cron