My AvrX application that gets the time via the Internet from a NIST server. It uses this to set some date/time variables. This happens at startup. In the 1000...
stevech11 sez, ... Um... first off 4-5 seconds every 24 hours is like 45ppm. A craptacular xtal might be 50ppm. If you have a frequency counter you can set...
Adding the init value to the counter works as well as CTC as long as you don't miss a complete rollover cycle. Even CTC fails if you completely miss the...
Ah so, I screwed up the math, eh, on 45ppm. Are the 32768Hz crystals in watches, etc, trimmed somehow? ... completely miss ... hasn't been ... Of Pink...
stevech11 sez, ... One other thing to watch out for is the load capacitors. They may well be wrong. Too much and the xtal runs slow, not enough to bother a...
Larry - with a 1000Hz interrupt rate, I tried to get a feel for the clock ISR execution time. Hard to do just looking at the listing file. Do you know? While...
It has been a long time since I counted cycles, but the overall cost of a AvrXTimer interrupt is ~250 cycles with a maximum latency (time interrupts off) of...
"The actual timer code takes more time" - is this on the order of a few tens of uSec (@16MHz)? Probably depends on length of linked lists for timers and...
In other RTOSes I've used, there's a "test and set" semaphore call. It returns the state of the semaphore before the attempt to set it true is made. So if the...
AvrXTestSemaphore() and AvrXIntTestSemaphore() if you're in an interrupt. Larry's website lists the APIs available grouped by RTOS element (task, semaphore,...
AvrXTestSemaphore() doesn't do test-and-set, as I understand. So making test-and-set needs two calls? If so, something better than cli() would be used to make...
I´m trying to build the avrx with aStudio 4.13. and i getting this error: c:/winavr-20071221/bin/../lib/gcc/avr/4.2.2/../../../../avr/bin/ld.exe: cannot find...
Someone here probably knows... Task A wants to use a global resource, let's say a RAM buffer. Other tasks may also want to use it. So we need mutual exclusion....
... I had the problem one day, that Messages were lost which are send from an Irq-Handler. Then I found out that there is a AvrXIntSendMessage function. Since...
Three things worth mentioning: - When used correctly, the AvrX API calls provide atomic access for you. You don't need to do test-and-set manually unless you...
Not sure if the header below is really the cause, but I do know that compiling the library with 20080402 and the Studio project with 20071221 produces a...
... This would have to be done AFTER some task does an AvrXWaitSemaphore(), right? Per what you suggested, the initialization would need to launch the task(s)...
I'm making great progress in getting the WizNet 810MJ (now 811MJ) Ethernet module with IP aboard to interface via SPI to a mega128 using AvrX and 100% my own...
If you turn interrupts off you will reduce the possibility of your issue to just one instruction time slot. I wrote the code below in this way because I...
thanks. Worried about impact of cli() to interrupt latency, I looked at the code for AvrXCancelTimerMessage(). It has a "BeginCritical" (an asm macro for cli,...
stevech11 sez, ... Usually I would expect that a function like AvrXCancelTimerMessage() would be thread safe. BeginCritical sure seems like an indication that...
He's extending the time interrupts are off in order to reduce the likelihood of a race condition where a timer expires after a message is handled, but before...
Right, Dean. I don't see any way to avoid using the cli() to eliminate the race condition. A new AvrXAPI call could be created to do the work (cancel a timer...
AvrXCancelTimerMessage was written to do the right thing regardless of the state of the system. If you get your message or semaphore from the ISR, calling ...
Larry - thanks very much. From the documents, it wasn't apparent that AvrXCancelTimerMessage() does as said below. I've created a MS Word and PDF document on...
Hello, This email message is a notification to let you know that a file has been uploaded to the Files area of the avrx group. File : /AvrX API Docs...