Skip to main content
Visitor II
January 10, 2007
Question

Known limitations issue

  • January 10, 2007
  • 6 replies
  • 1242 views
Posted on January 10, 2007 at 17:05

Known limitations issue

    This topic has been closed for replies.

    6 replies

    lseletronAuthor
    Visitor II
    January 8, 2007
    Posted on January 08, 2007 at 23:09

    Hi,

    The datasheet for st72325 states that under certain conditions the interrupt controller will not recognize the source of an interrupt and that to solve the problem,

    QUOTE

    '' Workaround

    To solve this issue, a “POP CC� instruction must

    always be preceded by a “SIM� instruction.

    ''

    END QUOTE

    I am using C and a COSMIC compiler to write the code. Does the COSMIC compiler insert a ''SIM '' instruction before a ''POP CC'' instruction?

    And generally, for all similar issues for which the solution is in software, does the compiler do it for me, i.e. are the COSMIC people aware of all these issues and do they include them in code generation?

    Thanks,

    zsavov

    Visitor II
    January 9, 2007
    Posted on January 09, 2007 at 13:50

    Hi,

    Thank you for your interest.

    Frommy experience, i don't see any conditions were a C code can generate a POP CC instruction. So, I don't think you should get this limitation.

    Best regards

    Laurent

    lseletronAuthor
    Visitor II
    January 10, 2007
    Posted on January 10, 2007 at 02:53

    Hi,

    QUOTE

    Frommy experience, i don't see any conditions were a C code can generate a POP CC instruction

    END QUOTE

    Are you saying that the C compiler will never generate a POP CC instruction? It seems to me POP is a very general operation so not using it when generating the assembly code would be impossible!

    Thank you

    Visitor II
    January 10, 2007
    Posted on January 10, 2007 at 05:55

    I would agree with Laurent, the core will always save/restore all regsiters except Y as part of the interrupt call, so unless you are writing a kernel nearly all application would never need to perform a pop CC.

    Regards

    sjo

    Visitor II
    January 10, 2007
    Posted on January 10, 2007 at 07:11

    I confirm the compiler never generates a POP CC instruction.

    Regards,

    Luca (Cosmic)

    Visitor II
    January 10, 2007
    Posted on January 10, 2007 at 17:05

    In order to avoid whichever problem, in all my ST7 applications, I prefer to implement all used interrupt, handelrs routines in pure ST7 assembler using #asm #endasm directives.

    In this way I have the complete stack and CC control and I have not never found problems in the interrupt management.

    Of course this is one nostalgic consequence of my old experience in the assembler programming.

    Sixtus