⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 start91460.asm

📁 FreeRTOS is a portable, open source, mini Real Time Kernel - a free to download and royalty free RTO
💻 ASM
📖 第 1 页 / 共 5 页
字号:
/*      THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU       */
/*      MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR       */
/*      ELIGIBILITY FOR ANY PURPOSES.                                                   */
/*      (C) 2007,2008 Fujitsu Microelectronics Europe GmbH                              */
;=========================================================================================
; 1  Contents
;=========================================================================================
; 1       Contents
; 2       Disclaimer
;
; 3       History
;
; 4       Settings
; 4.1     Controller device
; 4.2     Boot / flash security 
; 4.3     Stack type and stack size
; 4.4     Copy code from flash to I-RAM
; 4.5     C++ start-up 
; 4.6     Low-level library interface
; 4.7     Clock Configuration
; 4.7.1   Clock selection
; 4.7.2   Select Clock Modulator
; 4.8     External bus interface
; 4.8.1   Select chipselect 
; 4.8.2   Set memory addressing for chipselects
; 4.8.3   Configure chipselect area
; 4.8.4   Set wait cycles for chipselects
; 4.8.5   Configure chipselects SDRAM memory only 
; 4.8.6   Referesh control register RCR 
; 4.8.7   Terminal and timing control register
; 4.8.8   Enable / disable I-cache
; 4.8.9   Enable CACHE for chipselect
; 4.8.10  Select external bus mode (data lines)
; 4.8.11  Select external bus mode (address lines)
; 4.8.12  Select external bus mode (control signals)
;
; 5       Definitions of Configurations
;
; 6       Section and data declaration
; 6.1     Define stack size
; 6.2     Define sections
;
; 7.      S T A R T 
; 7.1     Initialise stack pointer and table base register
; 7.2     Check for CSV reset and set CSV
; 7.3     Check clock condition
; 7.4     Restore default settings after reset
; 7.4.1   Disable clock modulator
; 7.4.2   Check if running on sub clock, change to main clock
; 7.4.3   Disable sub clock
; 7.4.4   Check if running on PLL, gear down PLL
; 7.4.5   Disable PLL
; 7.4.6   Set to main clock
; 7.5     Set memory controller
; 7.6     Clock startup
; 7.6.1   Set Voltage Regulator Settings
; 7.6.2   Power on clock modulator - clock modulator part I
; 7.6.3   Set CLKR register w/o clock mode
; 7.6.4   Start PLLs 
; 7.6.5   Wait for PLL oscillation stabilisation
; 7.6.6   Set clocks 
; 7.6.6.1 Set CPU and peripheral clock
; 7.6.6.2 Set external bus interface clock
; 7.6.6.3 Set CAN clock prescaler
; 7.6.6.4 Switch main clock mode
; 7.6.6.5 Switch sub clock mode
; 7.6.6.6 Switch to PLL mode
; 7.6.7   Enable frequncy modulation - clock modulator part II
; 7.7     Set BusInterface
; 7.7.1   Disable all CS
; 7.7.2   Clear TCR register
; 7.7.3   Set CS0 
; 7.7.4   Set CS1 
; 7.7.5   Set CS2  
; 7.7.6   Set CS3
; 7.7.7   Set CS4
; 7.7.8   Set CS5 
; 7.7.9   Set CS6
; 7.7.10  Set CS7  
; 7.7.11  Set special SDRAM config register  
; 7.7.12  set Port function register
; 7.7.13  Set TCR register
; 7.7.14  Enable cache for selected CS
; 7.7.15  Set SDRAM referesh control register
; 7.7.16  Enable used CS
; 7.7.17  I-cache on/off
; 7.7.18  Set port function register to general as I/O-port
; 7.8     Copy code from flash to I-RAM
; 7.9     Fill stacks
; 7.10    Clear data 
; 7.11    Copy Init section from ROM to RAM
; 7.12    C library initialization
; 7.13    Call C++ constructors
; 7.14    Call main routine
; 7.15    Return from main function
;
;=========================================================================================
; 2  Disclaimer
;=========================================================================================
;                    Fujitsu Microelectronics Europe GmbH                       
;                http://emea.fujitsu.com/microelectronics 
;                                                              
;    The  following  software  is for  demonstration  purposes only. It  is not fully  
;    tested, nor  validated  in order to fullfill its task under  all  circumstances.  
;    Therefore,  this software or  any part of it must only  be used in an evaluation 
;    laboratory environment.                        
;    This  software  is  subject to  the  rules of  our  standard DISCLAIMER, that is
;    delivered with our  SW-tools on  the  Fujitsu  Microcontrollers  CD/DVD (V3.4 or 
;    higher "\START.HTM") or on our Internet Pages:                                   
;    http://www.fme.gsdc.de/gsdc.htm
;    http://emea.fujitsu.com/microelectronics 
;
;=========================================================================================
; 3  History
;=========================================================================================
;
;=========================================================================================
;       MB914xx (FR60 CORE ONLY) Series C Compiler's 
;
;       Startup file for memory and basic controller initialisation
;=========================================================================================
;History:
;
; 2005-04-18 V1.0 UMa  Release first version
; 2005-06-17 V1.1 UMa  Added bus interface, modified c++ startup
; 2005-06-28 V1.2 UMa  minor changes
; 2005-07-27 V1.3 UMa  default values changed
; 2005-10-04 V1.4 UMa  changed code 'Call main Routine'
;                      Added secutiy section for MB91F467D  
;                      Added Flash Access Read Timing setting section;
; 2005-10-04 V1.5 UMa  Added Flash Controller Section
; 2005-10-28 V1.6 UMa  Check for CSV reset
; 2005-11.16 V1.7 UMa  Monitor Debugger support added: Copy of intvect Table
;                      Ext. Int 0 as abort function
;                      Changed PLL-Startup, Reset HWWD added
; 2005-11-16 V1.7 UMa  Examples for MUL_G changed
; 2006-02-14 V1.8 UMa  mb91464a added
;                      Settings for Clock Spervisor added
;                      Name of Section SECURITY changed to SECURITY_VECTORS
;                      Example values for gear-up changed
; 2006-03-17 V1.9 UMa  Changed Startup for Monitor Debugger
; 2006-04-24 v2.0 UMa  Added MB91465K and MB91469G
; 2006-05-03 v2.1 UMa  Added MB91461R; removed MB91V460A
;                      Added settings for the external bus-interface
; 2006-07-28 v2.2 UMa  Added I-RAM copy function (ROM -> IRAM)
;                      Added default settings for FLASH Access Read Timing 
;                      Settings 
;                      Changed default settings for FLASH cache configuration 
;                      Register
;                      Changed check for clock startup
; 2006-08-16 v2.3 MVo  Corrected Boot Security Sector Addresses for MB91469G
; 2006-10-06 v2.4 UMa  Added new devices
;                      Corrected typo in I_RAM to flash copy function
;                      Changed default settings for flash cache configuration
;                      Changed comments for SDRAM bus interface configuration
;                      Changed comments and default setting of CAN Prescaler
;                      Added Stack filler
;                      Added Settings for REGSEL Register
; 2007-02-13 v2.5 UMa  Introduction of default configurations
;                      Changed I_RAM to flash copy function                    
;
;
;=========================================================================================
; 4  Settings
;=========================================================================================
;
; CHECK ALL OPTIONS WHETHER THEY FIT TO THE APPLICATION;
;
; Configure this startup file in the "Settings" section. Search for
; comments with leading "; <<<". This points to the items to be set.
;=========================================================================================
;
#set    OFF             0
#set    ON              1
#set    DEFAULT         2
#set    LOW_PRIOR       31
;
;=========================================================================================
; 4.1  Controller Device
;=========================================================================================
#set    MB91464A        2                       ; MB91460 series
;
#set    MB91467B       10                       ; MB91460 series
;
#set    MB91467C       11                       ; MB91460 series
;
#set    MB91467D        4                       ; MB91460 series
;
#set    MB91469G        6                       ; MB91460 series
;
#set    MB91465K        3                       ; MB91460 series
;
#set    MB91463N        8                       ; MB91460 series
;
#set    MB91461R        1                       ; MB91460 series
#set    MB91467R        5                       ; MB91460 series
;
#set    MB91465X        9                       ; MB91460 series
;
#set    others          7                       ; MB91460 series
;
;
;
#set    DEVICE          MB91467D                ; <<< select device
;
;=========================================================================================
; 4.2  Boot / Flash Security 
;=========================================================================================
;
#set    BOOT_FLASH_SEC  OFF                     ; <<< BOOT and Flash Security Vector    
;
; The flash devices have two flash and two boot security vectors.  It is important to set
; the four vectors correctly.  Otherwise it might be possible,  that the flash device is 
; not accessible any more via the bootrom. Please read carefully the hardware manual.
; 
; OFF:  The security feature is switch off. The section SECURITY_VECTORS is reserved and
;       the vectors are set.
; ON:   IMPORTANT! The  security vectors are  not set. But the  section SECURITY_VECTORS 
;       is reserved.  
;
; Note: This feature is not supported by every device. Please check the data sheet. This 
;       feature is not available on MB91461R.
;
;=========================================================================================
; 4.3  Stack Type and Stack Size
;=========================================================================================
;
#set    USRSTACK        0                       ; user stack:   for main program
#set    SYSSTACK        1                       ; system stack: for main program and 
;                                               ;               interrupts
;
;
#set    STACKUSE        SYSSTACK                ; <<< set active stack
;
#set    STACK_RESERVE   ON                      ; <<< reserve stack area in 
;                                               ;     this module
#set    STACK_SYS_SIZE  1000	                ; <<< byte size of System stack
#set    STACK_USR_SIZE  4                       ; <<< byte size of User stack 
;
#set    STACK_FILL      ON                     ; <<< fills the stack area with pattern
#set    STACK_PATTERN   0x55AA55AA              ; <<< the pattern to write to stack
;
; - If the active stack is set to SYSSTACK,  it is used for main program and interrupts. 
;   In this case,  the user stack  could be set to a dummy size.  If the active stack is 
;   set  to  user  stack,  it is  used  for the  main  program  but the  system stack is 
;   automatically activated,  if an interrupt is serviced.  Both stack areas must have a 
;   reasonable size.
; - If STACK_RESERVE is ON,  the sections USTACK and SSTACK are reserved in this module. 
;   Otherwise, they have to be reserved in other modules.  If STACK_RESERVE is OFF,  the 
;   size definitions STACK_SYS_SIZE and STACK_USR_SIZE have no meaning.
; - Even if  they  are reverved  in other modules,  they are  still initialised  in this 
;   start-up file.
;
; Note: Several library functions require quite a big stack (due to ANSI). 
;       Check the stack information files (*.stk) in the LIB\911 directory.
;
;=========================================================================================
; 4.4  Copy code from Flash to I-RAM
;=========================================================================================
;
#set    I_RAM           OFF                     ; <<< select  if  code  in  section IRAM
;                                                     should be copied
;
; If this option is activated code located in the  section IRAM is copied during startup 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -