Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

Please accept the use of cookies on our site

At PEmicro we use web browser cookies in order to provide you with an enhanced experience and in order to be able to do things like shopping cart processing and identify you when you login to our website.

Click here to accept

search inside this forum
search inside all forums
Log2Phy12 Address Translation.
John D. Oct 23, 2014 at 04:12 PM (16:12 hours)
Staff: Takao Y.

  • Is there an app note that explains how the translation that log2phy does relates to the M9S12XDP512.  How

    TCODE_BLOCK CodeBlock = {0};    // Initialize to force it to show up in .S19 file.

    Turns into:

    Original Logical Memory Usage Map
    0000C000-0000E6A2 000026A3 --> Page_FF (0xC000..0xFFFF in 64K Map)
    0000FF78-0000FF7B 00000004 --> Page_FF (0xC000..0xFFFF in 64K Map)
    0000FFD4-0000FFD7 00000004 --> Page_FF (0xC000..0xFFFF in 64K Map)
    0000FFFE-0000FFFF 00000002 --> Page_FF (0xC000..0xFFFF in 64K Map)
    00E08000-00E08021 00000022 --> Page_E0 CodeBlock
    00E48000-00E48021 00000022 --> Page_E4
    00FC8000-00FCB3ED 000033EE --> Page_FC
    00FE8000-00FEBC6F 00003C70 --> Page_FE
    Converted Physical Memory Usage Map
    00780000-00780021 00000022 --> Page_E0 CodeBlock
    00790000-00790021 00000022 --> Page_E4
    007F0000-007F33ED 000033EE --> Page_FC
    007F8000-007FBC6F 00003C70 --> Page_FE
    007FC000-007FE6A2 000026A3 --> Page_FF
    007FFF78-007FFF7B 00000004 --> Page_FF
    007FFFD4-007FFFD7 00000004 --> Page_FF
    007FFFFE-007FFFFF 00000002 --> Page_FF

    I've declared:
    unsigned int * __far24 WritePtr;

    And in the code the CodeWarrior debugger shows that WritePtr ends up with a value 0x780000 when
    WritePtr = (unsigned int * __far24)&CodeBlock.CodeImage;

    Teh GPAGE register is 0x78. Yet the page as defined in the linker.prm file identifies this page as E0.

    How is
    00E08000-00E08021 00000022 --> Page_E0 CodeBlock
    translated to
    00780000-00780021 00000022 --> Page_E0 CodeBlock

    The MC9S12XDP512 Data Sheet, Rev. 2.17 shows FLASH up to 7F_FFFF and the top 16K is mapped into 0xC000 of the 64K memory map. But again, how is Page FF mapped to FF_xxxx when Log2Phy assigns it to 7F_C000 yet Page E0 is at 78_0000



  • Greetings,

    Sorry that none of the P&E staff has been able to answer to your question. Were you able to find out the conversion between logical and physical addressing? We have a blog post about this here:

    Takao Yamada

Add comment

   Want to comment? Please login or create a new PEMicro account.

© 2018 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement