Page 1 of 1

Reboot Problem

PostPosted: Tue Nov 16, 2010 8:02 pm
by kwna
Hi,
I'm using Salvo Pro.
As a beginner, I come with a hard problem.
** Very simple code like tut 2 does not work. The processor reboots repeatedly.
Here is my code:
---------------------------------------------------------------------------------------------------
#include "main.h"
#include "salvo.h"
#include "salvocfg.h"

void TaskA (void){
while(1){ printf("Here\n",i); OS_Yield(); }
}

void TaskB (void){
while(1){ printf("There\n",i); OS_Yield(); }
}

void TaskC (void){
while(1){ printf("Nowhere\n",i); OS_Yield(); }
}

int main(void){
/* Initiallization */
sysclk_init ();
xbar_init ();
uart_init ();
interrupt_init();

OSInit();
OSCreateTask(TaskA, OSTCBP(1), 9);
OSCreateTask(TaskB, OSTCBP(2), 9);
OSCreateTask(TaskC, OSTCBP(3), 9);

while(1) { OSSched ();}
} // end of main
--------------------------------------------------------------------------
As shown, the code is very simple.
The result is like the last task C is running.

Checking with some added code, I found out that the 8051(C8051F021) is rebooting repeatedly just after doing
the task-C.

I don't know why.
----------------------------------------------------------------------------
Is there any simple code to show Salvo works very well?

Looking forwards to reply...