embedded systems developers tools, cross compilers
  Home  |   SwiftX Archive  |   SwiftForth Archive  |

RE : Interrupts don't interrupt?!

From: Mr Embedded <m_embed_at_yahoo.fr>
Date: Wed, 18 Apr 2007 17:32:10 +0200 (CEST)

Please also show us the interrupt code.
Gerry Thonigs <Gerald.Thonigs_at_web.de> a écrit : Hi,

I try to use the on-chip usb controller of a coldfire 5485 with an axiom
cml5485 board and swiftx 3.3.0.
In order to do so, I need to handle some interrupts. Since parts of the
initialization process are time critical and parts of the planned
application will be even much more, I tried to implement the following
concept:

VARIABLE V$SPIN

: Spin
    BINARY CR
    ." IMRL: "
    IMRL @ . CR
    ." IMRH: "
    IMRH @ . CR
    DECIMAL
    1 V$SPIN !
    1
    BEGIN
        \ PAUSE \ PAUSE essential (?!)
        1 + DUP
        100000 =
        V$SPIN @ 0 =
        OR
    UNTIL
    DROP
;

Where V$SPIN will be modified in the interrupt handler routine.
My observation is, that this doesn't work if I don't place the PAUSE in
the loop. But I normally would expect that the Interrupt (which fires
when connecting the plug of the usb-cable) would interrupt the loop,
modify the variable and return, so that the loop would be left after the
next V$SPIN @.

But not bad enough, I am not even able to loop more then 100000 times
without the PAUSE, then I get a "Unknown XTL request 128 from target",
apparently because the PSC Interrupts aren't serviced. Is my assumption
correct, that interrupts are only guaranteed to be handled within the
next full cycle of the round-robin-scheduler?

NO. Interrupts are serviced between CPU instructions. There is some other problem here which is not yet apparent.

I checked the mask registers, they read as zero - so why don't
interrupts inter-rupt?! What am I doing wrong?

Best regards,
Gerry

----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------

             
---------------------------------
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.

----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Wed Apr 18 2007 - 08:32:27 PDT

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:52 PST