Hi there!
Can anyone show me config file (start167.a66) and "Options for target" dialog of Keil for starting controller (st269) from internal flash.
I need this configuration: 0x0 - 0x40000 - internal flash 0x40000 - 0x80000 - external RAM 0x88000 - 0x089000 - mapping UART registers 0xFFF000 - 0x100000 - mapping ADC registers
RAM - Samsung K6X1008C2D ROM - AM29F040B
My start167.a66 file: _MCTC0 EQU 0 _RWDC0 EQU 1 _MTTC0 EQU 1 $SET (BTYP_ENABLE = 0) _BTYP0 EQU 2 _ALECTL0 EQU 0 _BUSACT0 EQU 1 ; Was 0 _RDYEN0 EQU 0 _RDY_AS0 EQU 0 _CSREN0 EQU 0 _CSWEN0 EQU 0 _XPERSHARE EQU 0 _VISIBLE EQU 0 _XPEN EQU 1 _BDRSTEN EQU 0 $SET (OWDDIS_ENABLE = 0) _OWDDIS EQU 0 _PWDCFG EQU 0 _CSCFG EQU 0 $SET (WRCFG_ENABLE = 1) _WRCFG EQU 1 _CLKEN EQU 1 _BYTDIS EQU 0 $SET (ROMEN_ENABLE = 1) _ROMEN EQU 1 $IF TINY _SGTDIS EQU 1 $ELSE _SGTDIS EQU 0 $ENDIF _ROMS1 EQU 0 ; _ROMS1 = 0 Internal ROM mapped to segment 0 $SET (STK_SIZE = 0) SSTSZ EQU 200H USTSZ EQU 200H $SET (WATCHDOG = 0) $SET (CLR_MEMORY = 1) $SET (INIT_VARS = 1) $SET (DPPUSE = 1) $SET (DPP3USE = 1) $SET (INIT_XPERCON = 0) V_XPERCON EQU 0000$0000$0000$0000B ; XPERCON values $SET (ADVANCED_SYSCON = 0) PDCON EQU 0 RTS EQU 0 ; 0 = Main oscillator SCS EQU 0 ; 0 = Main oscillator CLKCON EQU 0 ; 0 = Running on configured basic frequency CLKREL EQU 0 ; possible values are 0 .. 31 ADCDIS EQU 0 ; 1 = disable Analog/Digital Converter (SYSCON3.0) ASC0DIS EQU 0 ; 1 = disable UART ASC0 (SYSCON3.1) SSCDIS EQU 0 ; 1 = disable Synchronus Serial Cnl SSC (SYSCON3.2) GPTDIS EQU 0 ; 1 = disable Timer Block GPT (SYSCON3.3) ; reserved (SYSCON3.4) FMDIS EQU 0 ; 1 = disable on-chip Flash Memory Module (SYSCON3.5) CC1DIS EQU 0 ; 1 = disable CAPCOM Unit 1 (SYSCON3.6) CC2DIS EQU 0 ; 1 = disable CAPCOM Unit 2 (SYSCON3.7) CC6DIS EQU 0 ; 1 = disable CAPCOM Unit 6 (SYSCON3.8) PWMDIS EQU 0 ; 1 = disable Pulse Width Modulation Unit (SYSCON3.9) ASC1DIS EQU 0 ; 1 = disable UART ASC1 (SYSCON3.10) I2CDIS EQU 0 ; 1 = disable I2C Bus Module (SYSCON3.11) ; ; reserved (SYSCON3.12) CAN1DIS EQU 0 ; 1 = disable on-chip CAN Module 1 (SYSCON3.13) CAN2DIS EQU 0 ; 1 = disable on-chip CAN Module 2 (SYSCON3.14) PCDDIS EQU 0 ; 1 = disable Peripheral Clock Driver (SYSCON3.15) $SET (INIT_RSTCON = 0) R_RSTLEN EQU 0 ; 0 = 1024 TCL: standard duration R_SUE EQU 0 ; 0 = Configuration cannot be changed (default) R_CSSEL EQU 0 ; 0 = 3 CS lines (CS2# .. CS0#) (default) R_SALSEL EQU 0 ; 0 = 4-bit segment address: A19 .. A16 (default) R_CLKCFG EQU 0 ; 0 = CPU CLOCK = XTAL * 2.5 $SET (BUSCON1 = 1)
%DEFINE (ADDRESS1) (40000H) %DEFINE (RANGE1) (256K) _MCTC1 EQU 0 (MCTC1 field = 0EH). _RWDC1 EQU 1 _MTTC1 EQU 1 _BTYP1 EQU 2 _ALECTL1 EQU 0 _BUSACT1 EQU 1 ; = 0 external (ADDRSEL1) bus disabled _RDYEN1 EQU 0 _RDY_AS1 EQU 0 _CSREN1 EQU 0 _CSWEN1 EQU 0
$SET (BUSCON2 = 1) %DEFINE (ADDRESS2) (88000H) %DEFINE (RANGE2) (4K)
_MCTC2 EQU 1 ; Memory wait states is 1 (MCTC2 field = 0EH). _RWDC2 EQU 0 ; 0 = Delay Time 0.5 States _MTTC2 EQU 0 ; 0 = Delay Time 1 States _BTYP2 EQU 2 ; 0 = 8 Bit Non Multiplexed _ALECTL2 EQU 1 ; see data sheet for description _BUSACT2 EQU 1 ; = 0 external (ADDRSEL2) bus disabled _RDYEN2 EQU 0 ; 0 = READY# function disabled _RDY_AS2 EQU 0 ; 0 = synchronous READY# input _CSREN2 EQU 0 ; 0 = CS2# is independent of read command (RD#) _CSWEN2 EQU 0 ; 0 = CS2# is independent of write command (WR#)
$SET (BUSCON3 = 0) %DEFINE (ADDRESS3) (300000H) ; Set CS3# Start Address (default 300000H) %DEFINE (RANGE3) (1024K) ; Set CS3# Range (default 1024K = 1MB)
_MCTC3 EQU 1 ; Memory wait states is 1 (MCTC3 field = 0EH). _RWDC3 EQU 0 ; 0 = Delay Time 0.5 States _MTTC3 EQU 1 ; 0 = Delay Time 1 States _BTYP3 EQU 2 ; 0 = 8 Bit Non Multiplexed _ALECTL3 EQU 0 ; see data sheet for description _BUSACT3 EQU 1 ; = 0 external (ADDRSEL3) bus disabled _RDYEN3 EQU 0 ; 0 = READY# function disabled _RDY_AS3 EQU 0 ; 0 = synchronous READY# input _CSREN3 EQU 0 ; 0 = CS3# is independent of read command (RD#) _CSWEN3 EQU 0 ; 0 = CS3# is independent of write command (WR#)
$SET (BUSCON4 = 1) %DEFINE (ADDRESS4) (0FFF000H) ; Set CS4# Start Address (default 400000H) %DEFINE (RANGE4) (4K) ; Set CS4# Range (default 1024K = 1MB)
_MCTC4 EQU 7 ; Memory wait states is 1 (MCTC4 field = 0EH). _RWDC4 EQU 1 ; 0 = Delay Time 0.5 States _MTTC4 EQU 1 ; 0 = Delay Time 1 States _BTYP4 EQU 2 ; 0 = 8 Bit Non Multiplexed _ALECTL4 EQU 0 ; see data sheet for description _BUSACT4 EQU 1 ; = 0 external (ADDRSEL4) bus disabled _RDYEN4 EQU 0 ; 0 = READY# function disabled _RDY_AS4 EQU 0 ; 0 = synchronous READY# input _CSREN4 EQU 0 ; 0 = CS4# is independent of read command (RD#) _CSWEN4 EQU 0 ; 0 = CS4# is independent of write command (WR#)
Thanks for all!