This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BTYP in startup.a66 differs from Infineon User's Manual.

Infineon User's Manual, 12.96 Version 1.0 p. 8-18 has bit field (BTYP) '11: 16-bit Multiplexed Bus'. But startup.a66 (line 55 has '; 3 = 16 Bit Non Multiplexed'.

Please explain.

  • A binary value 11 = decimal value 3.

    Did I miss something?

    Jon

  • Per startup.a66:

    ; BTYP: External Bus Configuration Control (SYSCON.7 .. SYSCON.6):
    ; Note: These bits are only valid if _BUSACT == 1.
    _BTYP	EQU	3	; 0 = 8 Bit Non Multiplexed
    ;			; 1 = 8 Bit Multiplexed
    ;			; 2 = 16 Bit Multiplexed
    ;			; 3 = 16 Bit Non Multiplexed
    

    Users Manual, p 8-18 has:
    00: 8-bit demultiplexed...
    01: 8-bit multiplexed...
    10: 16-bit demultiplexed... (sic)
    11: 16-bit multiplexed...

    It seems startup.a66 should have 'non' with '2' and should omit it from '3'.

  • Startup.a66 is intended for 8xC166 microcontrollers, whereas you must be reading manual for a different microcontroller. 8xC166 differs from more recent microcontrollers in many respects, including external bus controller.
    Regards,
    Mike

  • The startup code provided in STARTUP.A66 is intended to be used with the C166 microcontrollers. The START167.A66 is intended for use with most all other C16x (C167, C165, C164, C163, and C161) devices.

    The BUS configuration from START167.A66 is:

    ; BTYP0: External Bus Configuration Control (BUSCON0.6 .. BUSCON0.7):
    _BTYP0   EQU    2       ; 0 = 8 Bit Non Multiplexed
    ;                       ; 1 = 8 Bit Multiplexed
    ;                       ; 2 = 16 Bit Non Multiplexed
    ;                       ; 3 = 16 Bit Multiplexed
    ;
    

    This is what you have found in your datasheet, so you must be looking at a C167-based device.

    The BUS configuration from STARTUP.A66 is:

    ; BTYP: External Bus Configuration Control (SYSCON.7 .. SYSCON.6):
    ; Note: These bits are only valid if _BUSACT == 1.
    _BTYP	EQU	3	; 0 = 8 Bit Non Multiplexed
    ;			; 1 = 8 Bit Multiplexed
    ;			; 2 = 16 Bit Multiplexed
    ;			; 3 = 16 Bit Non Multiplexed
    ;
    

    As you can see, these are different. You must select the startup code that matches your target device. Otherwise, you will have strange problems that are really tough to figure out and which will waste a lot of your time.

    Jon

    P.S. Startup code problems are the MOST COMMON mistake we see with users of the C16x devices.

  • I see the difference between '2' and '3' now.

    The misunderstanding occurred because a Keil support engineer told me that I should be using startup.a66, even though I had specifically mentioned C161O in my email to him.

    (In addition to your time and Mike's, this wasted my time when I modified startup.a66.)