Erik,
Thanks for providing the pwm sample code.
I finally got around testing it. Though I had some trouble running it.
Once I uploaded the code all LEDs were blinking periodically. In addition I got an message on the
USB console: 'pinmap not found for peripheral'.
It seems like the LPC11U24 doesn't like to use pin 22 for pwm out. Once I switched it to
your sample started working.
So far so good, I haven't seen any timer messages popping up.
Quote:
What kind of timescale are your interrupts working at?
I am currently using a NEC style remote. One bit is encoded between 0.5 msec to 2msec.
I lowered the PWM down to 30usec (@50%) and the still no misses with the above code.
Which make me wondering.
Why do I encounter those 'edge missing' problems on isr_up() (or down) when the IR receiver
toggles the line at even lower frequency?
Polling the pin works fine and it is only that ISR shows misses?
There ought to be an explanation for this behaviour.
I am using InteruptIn rise and fall to measure the timing of an incoming signal that is connected to pin 21. After having some problems I simplyfied the code and the problem still occurs.
For further investigation I checked with logic analyzer and I found out that INteruptIn seems to miss an edge once in a while. It mostly occurs a rising edge, but I have seen falling edge misses too.
Interestingly polling the same pin 21 in the main loop, does not expose that problem.
As you can see B1 stays zero, while B0 rises.