Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI

Ads

Discussion Groups

Discussion Groups | Freescale DSPs | uCOS for dsp56807

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

uCOS for dsp56807 - wicherba - Sep 11 13:02:52 2007



Hello,

I am trying to make the uCOS-II (v. 2.76) work on the dsp56807 with 
use of CodeWarrior 7.0. PE does not provide any example of using uCOS 
with this CPU so I have:

- created a new project for dsp56807
- added the uCOS beam
- added the uCOS files to the 'code' directory and to the project as 
'user beams'. I also made some minor changes in them (changing to "" 
in #includes, otherwise it doesn't compile)
- copied a code from a uCOS example (CPUUtil) to my main project file
- compiled the project

It was possible to compile the project, but after running it, CPU was 
behaving at least weird. After invoking OSStart() the programm was 
returning to the very beginning of main() (it looks like a CPU 
reset). Does anybody know the reason of these problems? Have any of 
you tried to run uCOS dsp56807 (i.e. dsp568xx) ? Any hints?

Regards

Bartek



(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )

Re: uCOS for dsp56807 - lesl...@netscape.net - Sep 12 7:35:06 2007

Hello,

You need to make sure that you save all of the registers in your interrupt service routines
using 

#pragma alignsp save_all

and also add uCOS-II support code to your interrupt service routines.? This code is:

to the beginning of the routine add -

? // support uCOS??? 
? OS_ENTER_CRITICAL();???????????????????????????????????????? 
???? OSIntNesting++;?????????????????? /* Increment interrupt nesting */??? 
? OS_EXIT_CRITICAL();
to the end of the routine add -

? uCOS1_OSIntExit();???????????// Decrement the nesting counter
?????????????????????????????????????? // and if 0 then determine if whether or not
?????????????????????????????????????? // a higher priority task has been awakened
?????????????????????????????????????? // by an ISR.??? 

lmf
-----Original Message-----
From: wicherba <w...@op.pl>
To: m...@yahoogroups.com
Sent: Tue, 11 Sep 2007 11:10 am
Subject: [motoroladsp] uCOS for dsp56807

Hello,

I am trying to make the uCOS-II (v. 2.76) work on the dsp56807 with 
use of CodeWarrior 7.0. PE does not provide any example of using uCOS 
with this CPU so I have:

- created a new project for dsp56807
- added the uCOS beam
- added the uCOS files to the 'code' directory and to the project as 
'user beams'. I also made some minor changes in them (changing to "" 
in #includes, otherwise it doesn't compile)
- copied a code from a uCOS example (CPUUtil) to my main project file
- compiled the project

It was possible to compile the project, but after running it, CPU was 
behaving at least weird. After invoking OSStart() the programm was 
returning to the very beginning of main() (it looks like a CPU 
reset). Does anybody know the reason of these problems? Have any of 
you tried to run uCOS dsp56807 (i.e. dsp568xx) ? Any hints?

Regards

Bartek



(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )

Re: uCOS for dsp56807 - wich...@op.pl - Sep 13 8:18:23 2007

Thanks for response. The thing is, that I don't use any ISRs yet. The debug=
ger doesn't even step into a SystemTask (PE_SystemTask()). Following happen=
s when I debug:

void main(void)
{
  PE_low_level_init();

 RandomSem =3D uCOS1_OSSemCreate(1);

  OSStart();                                        =
=20
}
void PE_low_level_init(void)
{
    .....
   Inhr1_Init(); //init timer for RTOS ticks
  __EI();
  OSInit();
  OSTaskCreate(PE_SystemTask, NULL, (void *)&PE_SystemTaskStk[0], 0);=20
}

void  OSStart (void)
{
    INT8U y;
    INT8U x;
    if (OSRunning =3D=3D FALSE) {
        y             =3D OSUnMapTbl[OSRdyGrp];=20=20=20=20=20=20=20=20
        x             =3D OSUnMapTbl[OSRdyTbl[y]];
        OSPrioHighRdy =3D (INT8U)((y << 3) + x);
        OSPrioCur     =3D OSPrioHighRdy;
        OSTCBHighRdy  =3D OSTCBPrioTbl[OSPrioHighRdy];=20
        OSTCBCur      =3D OSTCBHighRdy;
        OSStartHighRdy();                     //   <=3D=3D=3D=3D debugger j=
umps from here to Inhr1_Init() and then back to the beginning of main.
    }
}

It seems that there is some error in a port made by Processor Expert, or I =
do something wrong (more likely)...I will be really grateful for help.

Regards

Bartek

l...@netscape.net napisa=B3:
>Hello,
>
>You need to make sure that you save all of the registers in your interrupt=
 service routines using=20
>
>#pragma alignsp save_all
>
>and also add uCOS-II support code to your interrupt service routines.? Thi=
s code is:
>
>to the beginning of the routine add -
>
>? // support uCOS???=20
>? OS_ENTER_CRITICAL();????????????????????????????????????????=20
>???? OSIntNesting++;?????????????????? /* Increment interrupt nesting */??=
?=20
>? OS_EXIT_CRITICAL();
>to the end of the routine add -
>
>? uCOS1_OSIntExit();???????????// Decrement the nesting counter
>?????????????????????????????????????? // and if 0 then determine if wheth=
er or not
>?????????????????????????????????????? // a higher priority task has been =
awakened
>?????????????????????????????????????? // by an ISR.???=20
>
>lmf
>-----Original Message-----
>From: wicherba <w...@op.pl>
>To: m...@yahoogroups.com
>Sent: Tue, 11 Sep 2007 11:10 am
>Subject: [motoroladsp] uCOS for dsp56807
>Hello,
>
>I am trying to make the uCOS-II (v. 2.76) work on the dsp56807 with=20
>use of CodeWarrior 7.0. PE does not provide any example of using uCOS=20
>with this CPU so I have:
>
>- created a new project for dsp56807
>- added the uCOS beam
>- added the uCOS files to the 'code' directory and to the project as=20
>'user beams'. I also made some minor changes in them (changing to ""=20
>in #includes, otherwise it doesn't compile)
>- copied a code from a uCOS example (CPUUtil) to my main project file
>- compiled the project
>
>It was possible to compile the project, but after running it, CPU was=20
>behaving at least weird. After invoking OSStart() the programm was=20
>returning to the very beginning of main() (it looks like a CPU=20
>reset). Does anybody know the reason of these problems? Have any of=20
>you tried to run uCOS dsp56807 (i.e. dsp568xx) ? Any hints?
>
>Regards
>
>Bartek
>

=20


(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )