Chitter on Servo-Signals (Answered)

Hello

I'm working on a Board which decodes a PPM Signal (Sum-Signal of 12 Servo-Channels).

On the other Side the Board generates 9 Servo-Signals with two Pins connected to a Johnson-Counter. (Reset and Clock)

Johnson Counter: On each positive Edge of the Clock Signal the next Output-Pin goes high and the last Pin goes low...

Each Part of this functions works fine. No Chitter on the measured PPM Signal and also no Chitter on the Servo-Signals.

But when I run both functions at the same Time i have Chitter on the Servo-Signals. The PPM-Signal is decoded correctly and without Chitter.

The PPM-Decoding is realized with Pulse/Period Measuring on TimerB1. (TB1In is connected to the PPM-Signal)

The tb1ic is set to Priority 4.

The PWM-Generation for the Servos is realized with two Timers. B2 and B3.

One ist for the Pulses (1 to 2ms), and the other for the Reset every 22.5ms.

Both have the Interrupt Priority 7

Now I Analyzed the Signals with the Oscilloscope. I saw, that the Chitter occures exactly at the Moment, when the Interrupt of the Decoding is at the same Time of the Interrupt of the PWM.

I Alredy checked, if something with the Priority doesent works, but it works fine. It Jumps from Priority4 Interrupt to a Priority7 Interrupt, but not the other way.

When I stop timberB1 at the Beginning of the PWM-Interrupt, the Chitter is gone, but then the PPM-Decoding doesent works properly anymore. (I think because of the reloading-value on the Start)

Does anyone knows a way to get this Chitter away?

If nothing else works, I alredy thought abaout using the DMA for the Decoding... would this work?

Martin

Parents
  • Hello

    Well... it works :-)

    That part with the re-enabling of the Global Interrupts at the beginning of an Interrupt was really new to me. I don't remember, that I saw such thing anytime on another Microcontroller...

    But its ok... Its just good, that I know it now.

    I also found the part in the documentations now.

    Thanx very much for helping!

    Martin

Reply
  • Hello

    Well... it works :-)

    That part with the re-enabling of the Global Interrupts at the beginning of an Interrupt was really new to me. I don't remember, that I saw such thing anytime on another Microcontroller...

    But its ok... Its just good, that I know it now.

    I also found the part in the documentations now.

    Thanx very much for helping!

    Martin

Children
No Data