https://www.dropbox.com/s/jql248qve6he8xq/test01.rar
Above link is my source code that I use to debugging.
Search found 9 matches
- Wed Nov 21, 2012 2:34 am
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
- Tue Nov 20, 2012 3:40 pm
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
Re: AVRMega can't switch two threads
Now, I don't have source code. I will send it tomorrow.
- Tue Nov 20, 2012 2:26 pm
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
Re: AVRMega can't switch two threads
Yes, I initialized virtual timer already.
msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t time) {
chDbgCheckClassS();
if (TIME_INFINITE != time) {
VirtualTimer vt;
chVTSetI(&vt, time, wakeup, currp);
chSchGoSleepS(newstate);
if (chVTIsArmedI(&vt))
chVTResetI(&vt);
}
else ...
msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t time) {
chDbgCheckClassS();
if (TIME_INFINITE != time) {
VirtualTimer vt;
chVTSetI(&vt, time, wakeup, currp);
chSchGoSleepS(newstate);
if (chVTIsArmedI(&vt))
chVTResetI(&vt);
}
else ...
- Tue Nov 20, 2012 11:02 am
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
Re: AVRMega can't switch two threads
Now, I detect when program execute function chVTResetI(). After execute that my program will auto reset and run again from start of main function.
- Sun Nov 18, 2012 4:17 pm
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
Re: AVRMega can't switch two threads
mabl, do you have an example project for me? Maybe I setting wrong in file config (hal and os).
For AVR Dragon, now I'm buying it.
For AVR Dragon, now I'm buying it.
- Fri Nov 16, 2012 11:24 am
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
Re: AVRMega can't switch two threads
This link I add interrupt timer for base timer OS in board.c and disable all hal use in halconf.h
https://www.dropbox.com/s/pmsckf7ujp0p153/test.rar
https://www.dropbox.com/s/pmsckf7ujp0p153/test.rar
- Fri Nov 16, 2012 10:33 am
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
Re: AVRMega can't switch two threads
Have you made sure that your timer interrupts fire? Also, make sure that the code posted by Giovanni matches your hardware. Can you debug your hardware? How do you know that they are still stalled? Maybe the LEDs toggle faster than your eyes can see?
From suggest code interrupt timer has interval ...
From suggest code interrupt timer has interval ...
- Fri Nov 16, 2012 9:56 am
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
Re: AVRMega can't switch two threads
I follow your suggest code but both threads still suspend.
- Fri Nov 16, 2012 8:53 am
- Forum: AVR Support
- Topic: AVRMega can't switch two threads
- Replies: 15
- Views: 17363
AVRMega can't switch two threads
Now, I program in ATMEGA32 and using ChibiOS.
My program has 2 threads there are main and mythread, and using function chThdSleep() for delay both thread.
But after program executed function chThdSleep(), thread can't switch to other thread and it look like two thread are suspended forever.
What ...
My program has 2 threads there are main and mythread, and using function chThdSleep() for delay both thread.
But after program executed function chThdSleep(), thread can't switch to other thread and it look like two thread are suspended forever.
What ...