2007-11-18 11:09 PM
The digital input with interuppt gets a chatter signal
2007-10-18 07:01 AM
Hello,
I have a digital input with a interrupt. If the signal chatter the programm stopped. The signal is every 800 ns high. Are there to much interrupts to manage by the operating system? What can I do against the chattering?2007-10-18 09:35 PM
edv,
I think that you have posted to the wrong forum. This forum if for 8 bit microcontrollers whose maximum clock frequency is 8 MHz, i.e. a clock period of 125 ns. 800ns / 125 ns is 6.4 clock cycles. The interrupt processing takes 10 clock cycles to save registers plus the clocks cycles that are needed to complete the current instruction. If your digital input flickers so much, it is better to filter it because the digital interrupt handling routine will be called forever and it will overwrite the stack. EtaPhi2007-10-18 10:09 PM
Hello EtaPhi,
thank you for the answer. I don't think that I have posted in the wrong forum. I have a ST7. There are GAL's in the circuit which gives the clock puls for the digital input. It was not intended to put the signal at this input. It intersperse from another wire. The time is too short for completing the interrupt. That explain EtaPhi. I have made tests with a counter of the interrupts, but this counter failed. Bye, edv2007-10-19 12:57 AM
My apologies, edv, for thinking you posted in the wrong forum as many STR7xx users did recently.
The interrupt counter can work with some advice. When the interrupt handler routine runs, on some devices (e.g. ST7FLITEs) the other interrupt handlers are blocked (I Flag set) until the handler end. On some other devices (e.g. ST72xx) only the lower priority handlers are blocked, but the situation is the same: the interrupt handler runs, when it ends, the next handler is executed. Even if the other interrupts are masked, the counter can't be read because the CPU is continuously servicing interrupts and has no time to respond to your requests. Only if your ST7 has the nested interrupt feature, you can read the counter by an interrupt handler that has a higher priority than the one that services the external interrupts. On ST7LITEs, these interrupt sources have the higher priority (except reset and SWI), so timer handlers can't be used to sample the counter. I hope I was clear... Bye EtaPhi2007-11-18 11:09 PM
Hi,
excuse me. I don't have activated the interrupt in the project. If an interrupt occurs, the programm was stopped with error. With the right parametrization the programm works.