Option.inc
上传用户:zbk8730
上传日期:2017-08-10
资源大小:12168k
文件大小:2k
源码类别:

uCOS

开发平台:

C/C++

  1. ;===========================================
  2. ; NAME: OPTION.A
  3. ; DESC: Configuration options for .S files
  4. ; HISTORY:
  5. ; 02.28.2002: ver 0.0
  6. ; 03.11.2003: ver 0.0 attached for 2440.
  7. ; jan E, 2004: ver0.03  modified for 2440A01.
  8. ;===========================================
  9. ;Start address of each stacks,
  10. _STACK_BASEADDRESS EQU 0x33ff8000
  11. _MMUTT_STARTADDRESS EQU 0x33ff8000
  12. _ISR_STARTADDRESS EQU 0x33ffff00
  13. GBLL USE_MAIN 
  14. ;USE_MAIN SETL {TRUE}
  15. USE_MAIN SETL {FALSE}
  16. GBLL  PLL_ON_START
  17. PLL_ON_START SETL  {TRUE}
  18. GBLL ENDIAN_CHANGE
  19. ENDIAN_CHANGE SETL {FALSE}
  20. GBLA ENTRY_BUS_WIDTH
  21. ENTRY_BUS_WIDTH SETA 16
  22. ;BUSWIDTH = 16,32
  23. GBLA    BUSWIDTH ;max. bus width for the GPIO configuration
  24. BUSWIDTH SETA    32
  25. GBLA UCLK
  26. UCLK SETA 48000000
  27. GBLA XTAL_SEL
  28. GBLA FCLK
  29. GBLA CPU_SEL
  30. ;(1) Select CPU 
  31. ;CPU_SEL SETA 32440000 ; 32440000:2440X.
  32. CPU_SEL SETA 32440001 ; 32440001:2440A
  33. ;(2) Select XTaL
  34. XTAL_SEL SETA 12000000
  35. ;XTAL_SEL SETA 16934400
  36. ;(3) Select FCLK
  37. FCLK SETA 304000000
  38. ;FCLK SETA 296352000
  39. ;(4) Select Clock Division (Fclk:Hclk:Pclk)
  40. CLKDIV_VAL EQU 7 ; 0=1:1:1, 1=1:1:2, 2=1:2:2, 3=1:2:4, 4=1:4:4, 5=1:4:8, 6=1:3:3, 7=1:3:6.
  41.  [ XTAL_SEL = 12000000
  42.  
  43. [ FCLK = 271500000
  44. M_MDIV EQU 173 ;Fin=12.0MHz Fout=271.5MHz
  45. M_PDIV EQU 2
  46. [ CPU_SEL = 32440001
  47. M_SDIV EQU 2 ; 2440A
  48.     |
  49. M_SDIV EQU 1 ; 2440X
  50.     ]
  51. ]
  52. [ FCLK = 304000000
  53. M_MDIV EQU 68 ;Fin=12.0MHz Fout=304.8MHz
  54. M_PDIV EQU 1
  55. [ CPU_SEL = 32440001
  56. M_SDIV EQU 1 ; 2440A
  57. |
  58. M_SDIV EQU 0 ; 2440X
  59. ]
  60. ]
  61. [ UCLK = 48000000
  62. U_MDIV EQU 56 ;Fin=12.0MHz Fout=48MHz
  63. U_PDIV EQU 2
  64. U_SDIV EQU 2
  65. ]
  66. [ UCLK = 96000000
  67. U_MDIV EQU 56 ;Fin=12.0MHz Fout=96MHz
  68. U_PDIV EQU 2
  69. U_SDIV EQU 1
  70. ]
  71.   | ; else if XTAL_SEL = 16.9344Mhz
  72. [ FCLK = 266716800
  73. M_MDIV EQU 118 ;Fin=16.9344MHz
  74. M_PDIV EQU 2
  75. [ CPU_SEL = 32440001
  76. M_SDIV EQU 2 ; 2440A
  77. |
  78. M_SDIV EQU 1 ; 2440X
  79. ]
  80. ]
  81. [ FCLK = 296352000
  82. M_MDIV EQU 97 ;Fin=16.9344MHz
  83. M_PDIV EQU 1
  84. [ CPU_SEL = 32440001
  85. M_SDIV EQU 2 ; 2440A
  86. |
  87. M_SDIV EQU 1 ; 2440X
  88. ]
  89. ]
  90. [ FCLK = 541900800
  91. M_MDIV EQU 120 ;Fin=16.9344MHz
  92. M_PDIV EQU 2
  93. [ CPU_SEL = 32440001
  94. M_SDIV EQU 1 ; 2440A
  95. |
  96. M_SDIV EQU 0 ; 2440X
  97. ]
  98. ]
  99. [ UCLK = 48000000
  100. U_MDIV EQU 60 ;Fin=16.9344MHz Fout=48MHz
  101. U_PDIV EQU 4
  102. U_SDIV EQU 2
  103. ]
  104. [ UCLK = 96000000
  105. U_MDIV EQU 60 ;Fin=16.9344MHz Fout=96MHz
  106. U_PDIV EQU 4
  107. U_SDIV EQU 1
  108. ]
  109.    ] ; end of if XTAL_SEL = 12000000.
  110.   
  111. END