QP framework problem

Hi BlackBird,

First, let's clarify that the examples in the latest http://www.state-machine.com/arduino/qp_arduino.zip really have the problem that you report, because they work fine for me. Please note that you need to copy the \libraries\qp\ subdirectory to the arduino\libraries\ folder and the \examples\qp\ subdirectory to the arduino\examples\ folder. All this is described in the Application Note available online at http://www.state-machine.com/arduino/AN_Event-Driven_Arduino.pdf.

Now, regarding the EOS cameras project, it is using the previous version of QP. To bring it up to QP 4.3.00, you need to change the QF::onIdle() function in the bsp.cpp file as follows:

void QF::onIdle() {

#ifdef SAVE_POWER

    SMCR = (0 << SM0) | (1 << SE);  // idle sleep mode, adjust to your project

    // never separate the following two assembly instructions, see NOTE2
    __asm__ __volatile__ ("sei" "\n\t" :: );
    __asm__ __volatile__ ("sleep" "\n\t" :: );

    SMCR = 0;                                              // clear the SE bit

#else
    QF_INT_ENABLE();
#endif
}

Please make a post to this forum when you find out what's wrong with the QP examples and to confirm that the fix to the EOS cameras project works.