Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

uC/OS-II C18 port question

Status
Not open for further replies.

virus

Member level 1
Member level 1
Joined
May 9, 2004
Messages
39
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Location
Mars
Activity points
403
simulator ucos

The main loop of test application from
https://www.sputnickonline.com/projects/programs/micro/uCOS_for_PIC18/index.html

look like the following:

void main (void)
{
int i_test = 0xABCD;
INTCONbits.GIEH = 0;
OSInit();
OSTaskCreate(TestTask, (void *)&i_test, &TestTaskStk[0], 0);
OSStart();
}

As from the code above, setting GIEH to 0 disables the global interrupt. I found no code wrote for enable ISR in this example. I wonder how this work as TMR0 ISR is needed to perform some OS level tasks.
I simulate this example in MPLAB v6.51, and found that TMR0 ISR was not triggered when TMR0 overflow. Am I missing something here?

Hope someone could point me a direction.

Thanks & regards,
virus
 

ucos + projects

I'd expect the OSStart call to end up calling a processor-specific routine which enables all interrupts - this will be done only after all the other initialisation has been completed, so the processor doesn't get interrupts before it is ready.

HTH
barny
 

    virus

    Points: 2
    Helpful Answer Positive Rating
Currently, I’m working on the same port of uC/OS-II. And I have some suspicious over the operation of this RTOS as well.

Here is more information of my system.

OS: Win 2000
UC/OS version 2.51
MPLAB v 6.51

I test it using MPLAB Simulator, which I couldn’t see from watch window that the ISR was ever enabled. So I think this is the reason my system ran to OS_TaskIdle() and never exit this routine.

Is there anything that I’m doing wrongly?

Thanks,
wh
 

    virus

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top