hw_gpio.h 90 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349
  1. //*****************************************************************************
  2. //
  3. // Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
  4. //
  5. //
  6. // Redistribution and use in source and binary forms, with or without
  7. // modification, are permitted provided that the following conditions
  8. // are met:
  9. //
  10. // Redistributions of source code must retain the above copyright
  11. // notice, this list of conditions and the following disclaimer.
  12. //
  13. // Redistributions in binary form must reproduce the above copyright
  14. // notice, this list of conditions and the following disclaimer in the
  15. // documentation and/or other materials provided with the
  16. // distribution.
  17. //
  18. // Neither the name of Texas Instruments Incorporated nor the names of
  19. // its contributors may be used to endorse or promote products derived
  20. // from this software without specific prior written permission.
  21. //
  22. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  25. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  26. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  27. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  28. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  29. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  30. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  31. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  32. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. //
  34. //*****************************************************************************
  35. #ifndef __HW_GPIO_H__
  36. #define __HW_GPIO_H__
  37. //*****************************************************************************
  38. //
  39. // The following are defines for the GPIO register offsets.
  40. //
  41. //*****************************************************************************
  42. #define GPIO_O_GPIO_DATA 0x00000000 // 0x4000 5000 0x4000 6000 0x4000
  43. // 7000 0x4002 4000 GPIO Data
  44. // (GPIODATA)@@ offset 0x000 The
  45. // GPIODATA register is the data
  46. // register. In software control
  47. // mode@@ values written in the
  48. // GPIODATA register are transferred
  49. // onto the GPIO port pins if the
  50. // respective pins have been
  51. // configured as outputs through the
  52. // GPIO Direction (GPIODIR) register
  53. // (see page 653). In order to write
  54. // to GPIODATA@@ the corresponding
  55. // bits in the mask@@ resulting from
  56. // the address bus bits [9:2]@@ must
  57. // be set. Otherwise@@ the bit
  58. // values remain unchanged by the
  59. // write. Similarly@@ the values
  60. // read from this register are
  61. // determined for each bit by the
  62. // mask bit derived from the address
  63. // used to access the data
  64. // register@@ bits [9:2]. Bits that
  65. // are set in the address mask cause
  66. // the corresponding bits in
  67. // GPIODATA to be read@@ and bits
  68. // that are clear in the address
  69. // mask cause the corresponding bits
  70. // in GPIODATA to be read as 0@@
  71. // regardless of their value. A read
  72. // from GPIODATA returns the last
  73. // bit value written if the
  74. // respective pins are configured as
  75. // outputs@@ or it returns the value
  76. // on the corresponding input pin
  77. // when these are configured as
  78. // inputs. All bits are cleared by a
  79. // reset.
  80. #define GPIO_O_GPIO_DIR 0x00000400 // 0x4000 5400 0x4000 6400 0x4000
  81. // 7400 0x4002 4400 GPIO Direction
  82. // (GPIODIR)@@ offset 0x400 The
  83. // GPIODIR register is the data
  84. // direction register. Setting a bit
  85. // in the GPIODIR register
  86. // configures the corresponding pin
  87. // to be an output@@ while clearing
  88. // a bit configures the
  89. // corresponding pin to be an input.
  90. // All bits are cleared by a reset@@
  91. // meaning all GPIO pins are inputs
  92. // by default.
  93. #define GPIO_O_GPIO_IS 0x00000404 // 0x4000 5404 0x4000 6404 0x4000
  94. // 7404 0x4002 4404 GPIO Interrupt
  95. // Sense (GPIOIS)@@ offset 0x404 The
  96. // GPIOIS register is the interrupt
  97. // sense register. Setting a bit in
  98. // the GPIOIS register configures
  99. // the corresponding pin to detect
  100. // levels@@ while clearing a bit
  101. // configures the corresponding pin
  102. // to detect edges. All bits are
  103. // cleared by a reset.
  104. #define GPIO_O_GPIO_IBE 0x00000408 // 0x4000 5408 0x4000 6408 0x4000
  105. // 7408 0x4002 4408 GPIO Interrupt
  106. // Both Edges (GPIOIBE)@@ offset
  107. // 0x408 The GPIOIBE register allows
  108. // both edges to cause interrupts.
  109. // When the corresponding bit in the
  110. // GPIO Interrupt Sense (GPIOIS)
  111. // register is set to detect edges@@
  112. // setting a bit in the GPIOIBE
  113. // register configures the
  114. // corresponding pin to detect both
  115. // rising and falling edges@@
  116. // regardless of the corresponding
  117. // bit in the GPIO Interrupt Event
  118. // (GPIOIEV) register . Clearing a
  119. // bit configures the pin to be
  120. // controlled by the GPIOIEV
  121. // register. All bits are cleared by
  122. // a reset.
  123. #define GPIO_O_GPIO_IEV 0x0000040C // 0x4000 540C 0x4000 640C 0x4000
  124. // 740C 0x4002 440C GPIO Interrupt
  125. // Event (GPIOIEV)@@ offset 0x40C
  126. // The GPIOIEV register is the
  127. // interrupt event register. Setting
  128. // a bit in the GPIOIEV register
  129. // configures the corresponding pin
  130. // to detect rising edges or high
  131. // levels@@ depending on the
  132. // corresponding bit value in the
  133. // GPIO Interrupt Sense (GPIOIS)
  134. // register . Clearing a bit
  135. // configures the pin to detect
  136. // falling edges or low levels@@
  137. // depending on the corresponding
  138. // bit value in the GPIOIS register.
  139. // All bits are cleared by a reset.
  140. #define GPIO_O_GPIO_IM 0x00000410 // 0x4000 5410 0x4000 6410 0x4000
  141. // 7410 0x4002 4410 GPIO Interrupt
  142. // Mask (GPIOIM)@@ offset 0x410 The
  143. // GPIOIM register is the interrupt
  144. // mask register. Setting a bit in
  145. // the GPIOIM register allows
  146. // interrupts that are generated by
  147. // the corresponding pin to be sent
  148. // to the interrupt controller on
  149. // the combined interrupt signal.
  150. // Clearing a bit prevents an
  151. // interrupt on the corresponding
  152. // pin from being sent to the
  153. // interrupt controller. All bits
  154. // are cleared by a reset.
  155. #define GPIO_O_GPIO_RIS 0x00000414 // 0x4000 5414 0x4000 6414 0x4000
  156. // 7414 0x4002 4414 GPIO Raw
  157. // Interrupt Status (GPIORIS)@@
  158. // offset 0x414 The GPIORIS register
  159. // is the raw interrupt status
  160. // register. A bit in this register
  161. // is set when an interrupt
  162. // condition occurs on the
  163. // corresponding GPIO pin. If the
  164. // corresponding bit in the GPIO
  165. // Interrupt Mask (GPIOIM) register
  166. // is set@@ the interrupt is sent to
  167. // the interrupt controller. Bits
  168. // read as zero indicate that
  169. // corresponding input pins have not
  170. // initiated an interrupt. A bit in
  171. // this register can be cleared by
  172. // writing a 1 to the corresponding
  173. // bit in the GPIO Interrupt Clear
  174. // (GPIOICR) register.
  175. #define GPIO_O_GPIO_MIS 0x00000418 // 0x4000 5418 0x4000 6418 0x4000
  176. // 7418 0x4002 4418 GPIO Masked
  177. // Interrupt Status (GPIOMIS)@@
  178. // offset 0x418 The GPIOMIS register
  179. // is the masked interrupt status
  180. // register. If a bit is set in this
  181. // register@@ the corresponding
  182. // interrupt has triggered an
  183. // interrupt to the interrupt
  184. // controller. If a bit is clear@@
  185. // either no interrupt has been
  186. // generated@@ or the interrupt is
  187. // masked. If no port pin@@ other
  188. // than the one that is being used
  189. // as an ADC trigger@@ is being used
  190. // to generate interrupts@@ the
  191. // appropriate Interrupt Set Enable
  192. // (ENn) register can disable the
  193. // interrupts for the port@@ and the
  194. // ADC interrupt can be used to read
  195. // back the converted data.
  196. // Otherwise@@ the port interrupt
  197. // handler must ignore and clear
  198. // interrupts on the port pin and
  199. // wait for the ADC interrupt@@ or
  200. // the ADC interrupt must be
  201. // disabled in the EN0 register and
  202. // the port interrupt handler must
  203. // poll the ADC registers until the
  204. // conversion is completed. If no
  205. // port pin@@ other than the one
  206. // that is being used as an ADC
  207. // trigger@@ is being used to
  208. // generate interrupts@@ the
  209. // appropriate Interrupt Set Enable
  210. // (ENn) register can disable the
  211. // interrupts for the port@@ and the
  212. // ADC interrupt can be used to read
  213. // back the converted data.
  214. // Otherwise@@ the port interrupt
  215. // handler must ignore and clear
  216. // interrupts on the port pin and
  217. // wait for the ADC interrupt@@ or
  218. // the ADC interrupt must be
  219. // disabled in the EN0 register and
  220. // the port interrupt handler must
  221. // poll the ADC registers until the
  222. // conversion is completed. Note
  223. // that if the Port B GPIOADCCTL
  224. // register is cleared@@ PB4 can
  225. // still be used as an external
  226. // trigger for the ADC. This is a
  227. // legacy mode which allows code
  228. // written for previous Stellaris
  229. // devices to operate on this
  230. // microcontroller. GPIOMIS is the
  231. // state of the interrupt after
  232. // masking.
  233. #define GPIO_O_GPIO_ICR 0x0000041C // 0x4000 541C 0x4000 641C 0x4000
  234. // 741C 0x4002 441C GPIO Interrupt
  235. // Clear (GPIOICR)@@ offset 0x41C
  236. // The GPIOICR register is the
  237. // interrupt clear register. Writing
  238. // a 1 to a bit in this register
  239. // clears the corresponding
  240. // interrupt bit in the GPIORIS and
  241. // GPIOMIS registers. Writing a 0
  242. // has no effect.
  243. #define GPIO_O_GPIO_AFSEL 0x00000420 // 0x4000 5420 0x4000 6420 0x4000
  244. // 7420 0x4002 4420 GPIO Alternate
  245. // Function Select (GPIOAFSEL)@@
  246. // offset 0x420 The GPIOAFSEL
  247. // register is the mode control
  248. // select register. If a bit is
  249. // clear@@ the pin is used as a GPIO
  250. // and is controlled by the GPIO
  251. // registers. Setting a bit in this
  252. // register configures the
  253. // corresponding GPIO line to be
  254. // controlled by an associated
  255. // peripheral. Several possible
  256. // peripheral functions are
  257. // multiplexed on each GPIO. The
  258. // GPIO Port Control (GPIOPCTL)
  259. // register is used to select one of
  260. // the possible functions.
  261. #define GPIO_O_GPIO_DR2R 0x00000500 // 0x4000 5500 0x4000 6500 0x4000
  262. // 7500 0x4002 4500 GPIO 2-mA Drive
  263. // Select (GPIODR2R)@@ offset 0x500
  264. // The GPIODR2R register is the 2-mA
  265. // drive control register. Each GPIO
  266. // signal in the port can be
  267. // individually configured without
  268. // affecting the other pads. When
  269. // setting the DRV2 bit for a GPIO
  270. // signal@@ the corresponding DRV4
  271. // bit in the GPIODR4R register and
  272. // DRV8 bit in the GPIODR8R register
  273. // are automatically cleared by
  274. // hardware. By default@@ all GPIO
  275. // pins have 2-mA drive.
  276. #define GPIO_O_GPIO_DR4R 0x00000504 // 0x4000 5504 0x4000 6504 0x4000
  277. // 7504 0x4002 4504 GPIO 4-mA Drive
  278. // Select (GPIODR4R)@@ offset 0x504
  279. // The GPIODR4R register is the 4-mA
  280. // drive control register. Each GPIO
  281. // signal in the port can be
  282. // individually configured without
  283. // affecting the other pads. When
  284. // setting the DRV4 bit for a GPIO
  285. // signal@@ the corresponding DRV2
  286. // bit in the GPIODR2R register and
  287. // DRV8 bit in the GPIODR8R register
  288. // are automatically cleared by
  289. // hardware.
  290. #define GPIO_O_GPIO_DR8R 0x00000508 // 0x4000 5508 0x4000 6508 0x4000
  291. // 7508 0x4002 4508 GPIO 8-mA Drive
  292. // Select (GPIODR8R)@@ offset 0x508
  293. // The GPIODR8R register is the 8-mA
  294. // drive control register. Each GPIO
  295. // signal in the port can be
  296. // individually configured without
  297. // affecting the other pads. When
  298. // setting the DRV8 bit for a GPIO
  299. // signal@@ the corresponding DRV2
  300. // bit in the GPIODR2R register and
  301. // DRV4 bit in the GPIODR4R register
  302. // are automatically cleared by
  303. // hardware. The 8-mA setting is
  304. // also used for high-current
  305. // operation. Note: There is no
  306. // configuration difference between
  307. // 8-mA and high-current operation.
  308. // The additional current capacity
  309. // results from a shift in the
  310. // VOH/VOL levels.
  311. #define GPIO_O_GPIO_ODR 0x0000050C // 0x4000 550C 0x4000 650C 0x4000
  312. // 750C 0x4002 450C GPIO Open Drain
  313. // Select (GPIOODR)@@ offset 0x50C
  314. // The GPIOODR register is the open
  315. // drain control register. Setting a
  316. // bit in this register enables the
  317. // open-drain configuration of the
  318. // corresponding GPIO pad. When
  319. // open-drain mode is enabled@@ the
  320. // corresponding bit should also be
  321. // set in the GPIO Digital Input
  322. // Enable (GPIODEN) register .
  323. // Corresponding bits in the drive
  324. // strength and slew rate control
  325. // registers (GPIODR2R@@ GPIODR4R@@
  326. // GPIODR8R@@ and GPIOSLR) can be
  327. // set to achieve the desired rise
  328. // and fall times. The GPIO acts as
  329. // an open-drain input if the
  330. // corresponding bit in the GPIODIR
  331. // register is cleared. If open
  332. // drain is selected while the GPIO
  333. // is configured as an input@@ the
  334. // GPIO will remain an input and the
  335. // open-drain selection has no
  336. // effect until the GPIO is changed
  337. // to an output. When using the I2C
  338. // module@@ in addition to
  339. // configuring the pin to open
  340. // drain@@ the GPIO Alternate
  341. // Function Select (GPIOAFSEL)
  342. // register bits for the I2C clock
  343. // and data pins should be set
  344. #define GPIO_O_GPIO_PUR 0x00000510 // 0x4000 5510 0x4000 6510 0x4000
  345. // 7510 0x4002 4510 GPIO Pull-Up
  346. // Select (GPIOPUR)@@ offset 0x510
  347. // The GPIOPUR register is the
  348. // pull-up control register. When a
  349. // bit is set@@ a weak pull-up
  350. // resistor on the corresponding
  351. // GPIO signal is enabled. Setting a
  352. // bit in GPIOPUR automatically
  353. // clears the corresponding bit in
  354. // the GPIO Pull-Down Select
  355. // (GPIOPDR) register . Write access
  356. // to this register is protected
  357. // with the GPIOCR register. Bits in
  358. // GPIOCR that are cleared prevent
  359. // writes to the equivalent bit in
  360. // this register.
  361. #define GPIO_O_GPIO_PDR 0x00000514 // 0x4000 5514 0x4000 6514 0x4000
  362. // 7514 0x4002 4514 GPIO Pull-Down
  363. // Select (GPIOPDR)@@ offset 0x514
  364. // The GPIOPDR register is the
  365. // pull-down control register. When
  366. // a bit is set@@ a weak pull-down
  367. // resistor on the corresponding
  368. // GPIO signal is enabled. Setting a
  369. // bit in GPIOPDR automatically
  370. // clears the corresponding bit in
  371. // the GPIO Pull-Up Select (GPIOPUR)
  372. // register
  373. #define GPIO_O_GPIO_SLR 0x00000518 // 0x4000 5518 0x4000 6518 0x4000
  374. // 7518 0x4002 4518 The GPIOSLR
  375. // register is the slew rate control
  376. // register. Slew rate control is
  377. // only available when using the
  378. // 8-mA drive strength option via
  379. // the GPIO 8-mA Drive Select
  380. // (GPIODR8R) register
  381. #define GPIO_O_GPIO_DEN 0x0000051C // 0x4000 551C 0x4000 651C 0x4000
  382. // 751C 0x4002 451C GPIO Digital
  383. // Enable (GPIODEN)@@ offset 0x51C
  384. // Note: Pins configured as digital
  385. // inputs are Schmitt-triggered. The
  386. // GPIODEN register is the digital
  387. // enable register. By default@@ all
  388. // GPIO signals except those listed
  389. // below are configured out of reset
  390. // to be undriven (tristate). Their
  391. // digital function is disabled;
  392. // they do not drive a logic value
  393. // on the pin and they do not allow
  394. // the pin voltage into the GPIO
  395. // receiver. To use the pin as a
  396. // digital input or output (either
  397. // GPIO or alternate function)@@ the
  398. // corresponding GPIODEN bit must be
  399. // set.
  400. #define GPIO_O_GPIO_LOCK 0x00000520 // 0x4000 5520 0x4000 6520 0x4000
  401. // 7520 0x4002 4520 GPIO Lock
  402. // (GPIOLOCK)@@ offset 0x520 The
  403. // GPIOLOCK register enables write
  404. // access to the GPIOCR register .
  405. // Writing 0x4C4F.434B to the
  406. // GPIOLOCK register unlocks the
  407. // GPIOCR register. Writing any
  408. // other value to the GPIOLOCK
  409. // register re-enables the locked
  410. // state. Reading the GPIOLOCK
  411. // register returns the lock status
  412. // rather than the 32-bit value that
  413. // was previously written.
  414. // Therefore@@ when write accesses
  415. // are disabled@@ or locked@@
  416. // reading the GPIOLOCK register
  417. // returns 0x0000.0001. When write
  418. // accesses are enabled@@ or
  419. // unlocked@@ reading the GPIOLOCK
  420. // register returns 0x0000.0000.
  421. #define GPIO_O_GPIO_CR 0x00000524 // 0x4000 5524 0x4000 6524 0x4000
  422. // 7524 0x4002 4524 GPIO Commit
  423. // (GPIOCR)@@ offset 0x524 The
  424. // GPIOCR register is the commit
  425. // register. The value of the GPIOCR
  426. // register determines which bits of
  427. // the GPIOAFSEL@@ GPIOPUR@@
  428. // GPIOPDR@@ and GPIODEN registers
  429. // are committed when a write to
  430. // these registers is performed. If
  431. // a bit in the GPIOCR register is
  432. // cleared@@ the data being written
  433. // to the corresponding bit in the
  434. // GPIOAFSEL@@ GPIOPUR@@ GPIOPDR@@
  435. // or GPIODEN registers cannot be
  436. // committed and retains its
  437. // previous value. If a bit in the
  438. // GPIOCR register is set@@ the data
  439. // being written to the
  440. // corresponding bit of the
  441. // GPIOAFSEL@@ GPIOPUR@@ GPIOPDR@@
  442. // or GPIODEN registers is committed
  443. // to the register and reflects the
  444. // new value. The contents of the
  445. // GPIOCR register can only be
  446. // modified if the status in the
  447. // GPIOLOCK register is unlocked.
  448. // Writes to the GPIOCR register are
  449. // ignored if the status in the
  450. // GPIOLOCK register is locked.
  451. #define GPIO_O_GPIO_AMSEL 0x00000528 // 0x4000 5528 0x4000 6528 0x4000
  452. // 7528 0x4002 4528 The GPIOAMSEL
  453. // register controls isolation
  454. // circuits to the analog side of a
  455. // unified I/O pad. Because the
  456. // GPIOs may be driven by a 5-V
  457. // source and affect analog
  458. // operation@@ analog circuitry
  459. // requires isolation from the pins
  460. // when they are not used in their
  461. // analog function. Each bit of this
  462. // register controls the isolation
  463. // circuitry for the corresponding
  464. // GPIO signal.
  465. #define GPIO_O_GPIO_PCTL 0x0000052C // This register is not used in
  466. // cc3xx. equivalant register exsist
  467. // outside GPIO IP (refer
  468. // PAD*_config register in the
  469. // shared comn space) 0x4000 552C
  470. // 0x4000 652C 0x4000 752C 0x4002
  471. // 452C GPIO Port Control
  472. // (GPIOPCTL)@@ offset 0x52C The
  473. // GPIOPCTL register is used in
  474. // conjunction with the GPIOAFSEL
  475. // register and selects the specific
  476. // peripheral signal for each GPIO
  477. // pin when using the alternate
  478. // function mode. Most bits in the
  479. // GPIOAFSEL register are cleared on
  480. // reset@@ therefore most GPIO pins
  481. // are configured as GPIOs by
  482. // default. When a bit is set in the
  483. // GPIOAFSEL register@@ the
  484. // corresponding GPIO signal is
  485. // controlled by an associated
  486. // peripheral. The GPIOPCTL register
  487. // selects one out of a set of
  488. // peripheral functions for each
  489. // GPIO@@ providing additional
  490. // flexibility in signal definition.
  491. #define GPIO_O_GPIO_ADCCTL 0x00000530 // This register is not used in
  492. // cc3xx. ADC trigger via GPIO is
  493. // not supported. 0x4000 5530 0x4000
  494. // 6530 0x4000 7530 0x4002 4530 GPIO
  495. // ADC Control (GPIOADCCTL)@@ offset
  496. // 0x530 This register is used to
  497. // configure a GPIO pin as a source
  498. // for the ADC trigger. Note that if
  499. // the Port B GPIOADCCTL register is
  500. // cleared@@ PB4 can still be used
  501. // as an external trigger for the
  502. // ADC. This is a legacy mode which
  503. // allows code written for previous
  504. // Stellaris devices to operate on
  505. // this microcontroller.
  506. #define GPIO_O_GPIO_DMACTL 0x00000534 // 0x4000 5534 0x4000 6534 0x4000
  507. // 7534 0x4002 4534 GPIO DMA Control
  508. // (GPIODMACTL)@@ offset 0x534 This
  509. // register is used to configure a
  510. // GPIO pin as a source for the ?DMA
  511. // trigger.
  512. #define GPIO_O_GPIO_SI 0x00000538 // 0x4000 5538 0x4000 6538 0x4000
  513. // 7538 0x4002 4538 GPIO Select
  514. // Interrupt (GPIOSI)@@ offset 0x538
  515. // This register is used to enable
  516. // individual interrupts for each
  517. // pin. Note: This register is only
  518. // available on Port P and Port Q.
  519. #define GPIO_O_GPIO_PERIPHID4 0x00000FD0 // 0x4000 5FD0 0x4000 6FD0 0x4000
  520. // 7FD0 0x4002 4FD0 GPIO Peripheral
  521. // Identification 4
  522. // (GPIOPeriphID4)@@ offset 0xFD0
  523. // The GPIOPeriphID4@@
  524. // GPIOPeriphID5@@ GPIOPeriphID6@@
  525. // and GPIOPeriphID7 registers can
  526. // conceptually be treated as one
  527. // 32-bit register; each register
  528. // contains eight bits of the 32-bit
  529. // register@@ used by software to
  530. // identify the peripheral.
  531. #define GPIO_O_GPIO_PERIPHID5 0x00000FD4 // 0x4000 5FD4 0x4000 6FD4 0x4000
  532. // 7FD4 0x4002 4FD4 GPIO Peripheral
  533. // Identification 5
  534. // (GPIOPeriphID5)@@ offset 0xFD4
  535. // The GPIOPeriphID4@@
  536. // GPIOPeriphID5@@ GPIOPeriphID6@@
  537. // and GPIOPeriphID7 registers can
  538. // conceptually be treated as one
  539. // 32-bit register; each register
  540. // contains eight bits of the 32-bit
  541. // register@@ used by software to
  542. // identify the peripheral.
  543. #define GPIO_O_GPIO_PERIPHID6 0x00000FD8 // 0x4000 5FD8 0x4000 6FD8 0x4000
  544. // 7FD8 0x4002 4FD8 GPIO Peripheral
  545. // Identification 6
  546. // (GPIOPeriphID6)@@ offset 0xFD8
  547. // The GPIOPeriphID4@@
  548. // GPIOPeriphID5@@ GPIOPeriphID6@@
  549. // and GPIOPeriphID7 registers can
  550. // conceptually be treated as one
  551. // 32-bit register; each register
  552. // contains eight bits of the 32-bit
  553. // register@@ used by software to
  554. // identify the peripheral.
  555. #define GPIO_O_GPIO_PERIPHID7 0x00000FDC // 0x4000 5FDC 0x4000 6FDC 0x4000
  556. // 7FDC 0x4002 4FDC GPIO Peripheral
  557. // Identification 7
  558. // (GPIOPeriphID7)@@ offset 0xFDC
  559. // The GPIOPeriphID4@@
  560. // GPIOPeriphID5@@ GPIOPeriphID6@@
  561. // and GPIOPeriphID7 registers can
  562. // conceptually be treated as one
  563. // 32-bit register; each register
  564. // contains eight bits of the 32-bit
  565. // register@@ used by software to
  566. // identify the peripheral.
  567. #define GPIO_O_GPIO_PERIPHID0 0x00000FE0 // 0x4000 5FE0 0x4000 6FE0 0x4000
  568. // 7FE0 0x4002 4FE0 GPIO Peripheral
  569. // Identification 0
  570. // (GPIOPeriphID0)@@ offset 0xFE0
  571. // The GPIOPeriphID0@@
  572. // GPIOPeriphID1@@ GPIOPeriphID2@@
  573. // and GPIOPeriphID3 registers can
  574. // conceptually be treated as one
  575. // 32-bit register; each register
  576. // contains eight bits of the 32-bit
  577. // register@@ used by software to
  578. // identify the peripheral.
  579. #define GPIO_O_GPIO_PERIPHID1 0x00000FE4 // 0x4000 5FE4 0x4000 6FE4 0x4000
  580. // 7FE4 0x4002 4FE4 GPIO Peripheral
  581. // Identification 1
  582. // (GPIOPeriphID1)@@ offset 0xFE4
  583. // The GPIOPeriphID0@@
  584. // GPIOPeriphID1@@ GPIOPeriphID2@@
  585. // and GPIOPeriphID3 registers can
  586. // conceptually be treated as one
  587. // 32-bit register; each register
  588. // contains eight bits of the 32-bit
  589. // register@@ used by software to
  590. // identify the peripheral.
  591. #define GPIO_O_GPIO_PERIPHID2 0x00000FE8 // 0x4000 5FE8 0x4000 6FE8 0x4000
  592. // 7FE8 0x4002 4FE8 GPIO Peripheral
  593. // Identification 2
  594. // (GPIOPeriphID2)@@ offset 0xFE8
  595. // The GPIOPeriphID0@@
  596. // GPIOPeriphID1@@ GPIOPeriphID2@@
  597. // and GPIOPeriphID3 registers can
  598. // conceptually be treated as one
  599. // 32-bit register; each register
  600. // contains eight bits of the 32-bit
  601. // register@@ used by software to
  602. // identify the peripheral.
  603. #define GPIO_O_GPIO_PERIPHID3 0x00000FEC // 0x4000 5FEC 0x4000 6FEC 0x4000
  604. // 7FEC 0x4002 4FEC GPIO Peripheral
  605. // Identification 3
  606. // (GPIOPeriphID3)@@ offset 0xFEC
  607. // The GPIOPeriphID0@@
  608. // GPIOPeriphID1@@ GPIOPeriphID2@@
  609. // and GPIOPeriphID3 registers can
  610. // conceptually be treated as one
  611. // 32-bit register; each register
  612. // contains eight bits of the 32-bit
  613. // register@@ used by software to
  614. // identify the peripheral.
  615. #define GPIO_O_GPIO_PCELLID0 0x00000FF0 // 0x4000 5FF0 0x4000 6FF0 0x4000
  616. // 7FF0 0x4002 4FF0 GPIO PrimeCell
  617. // Identification 0 (GPIOPCellID0)@@
  618. // offset 0xFF0 The GPIOPCellID0@@
  619. // GPIOPCellID1@@ GPIOPCellID2@@ and
  620. // GPIOPCellID3 registers are four
  621. // 8-bit wide registers@@ that can
  622. // conceptually be treated as one
  623. // 32-bit register. The register is
  624. // used as a standard
  625. // cross-peripheral identification
  626. // system.
  627. #define GPIO_O_GPIO_PCELLID1 0x00000FF4 // 0x4000 5FF4 0x4000 6FF4 0x4000
  628. // 7FF4 0x4002 4FF4 GPIO PrimeCell
  629. // Identification 1 (GPIOPCellID1)@@
  630. // offset 0xFF4 The GPIOPCellID0@@
  631. // GPIOPCellID1@@ GPIOPCellID2@@ and
  632. // GPIOPCellID3 registers are four
  633. // 8-bit wide registers@@ that can
  634. // conceptually be treated as one
  635. // 32-bit register. The register is
  636. // used as a standard
  637. // cross-peripheral identification
  638. // system.
  639. #define GPIO_O_GPIO_PCELLID2 0x00000FF8 // 0x4000 5FF8 0x4000 6FF8 0x4000
  640. // 7FF8 0x4002 4FF8 GPIO PrimeCell
  641. // Identification 2 (GPIOPCellID2)@@
  642. // offset 0xFF8 The GPIOPCellID0@@
  643. // GPIOPCellID1@@ GPIOPCellID2@@ and
  644. // GPIOPCellID3 registers are four
  645. // 8-bit wide registers@@ that can
  646. // conceptually be treated as one
  647. // 32-bit register. The register is
  648. // used as a standard
  649. // cross-peripheral identification
  650. // system.
  651. #define GPIO_O_GPIO_PCELLID3 0x00000FFC // 0x4000 5FFC 0x4000 6FFC 0x4000
  652. // 7FFC 0x4002 4FFC GPIO PrimeCell
  653. // Identification 3 (GPIOPCellID3)@@
  654. // offset 0xFFC The GPIOPCellID0@@
  655. // GPIOPCellID1@@ GPIOPCellID2@@ and
  656. // GPIOPCellID3 registers are four
  657. // 8-bit wide registers@@ that can
  658. // conceptually be treated as one
  659. // 32-bit register. The register is
  660. // used as a standard
  661. // cross-peripheral identification
  662. // system.0xb1
  663. //******************************************************************************
  664. //
  665. // The following are defines for the bit fields in the GPIO_O_GPIO_DATA register.
  666. //
  667. //******************************************************************************
  668. #define GPIO_GPIO_DATA_DATA_M 0x000000FF // GPIO Data This register is
  669. // virtually mapped to 256 locations
  670. // in the address space. To
  671. // facilitate the reading and
  672. // writing of data to these
  673. // registers by independent
  674. // drivers@@ the data read from and
  675. // written to the registers are
  676. // masked by the eight address lines
  677. // [9:2]. Reads from this register
  678. // return its current state. Writes
  679. // to this register only affect bits
  680. // that are not masked by ADDR[9:2]
  681. // and are configured as outputs.
  682. #define GPIO_GPIO_DATA_DATA_S 0
  683. //******************************************************************************
  684. //
  685. // The following are defines for the bit fields in the GPIO_O_GPIO_DIR register.
  686. //
  687. //******************************************************************************
  688. #define GPIO_GPIO_DIR_DIR_M 0x000000FF // GPIO Data Direction Value
  689. // Description 0 Corresponding pin
  690. // is an input. 1 Corresponding pins
  691. // is an output.
  692. #define GPIO_GPIO_DIR_DIR_S 0
  693. //******************************************************************************
  694. //
  695. // The following are defines for the bit fields in the GPIO_O_GPIO_IS register.
  696. //
  697. //******************************************************************************
  698. #define GPIO_GPIO_IS_IS_M 0x000000FF // GPIO Interrupt Sense Value
  699. // Description 0 The edge on the
  700. // corresponding pin is detected
  701. // (edge-sensitive). 1 The level on
  702. // the corresponding pin is detected
  703. // (level-sensitive).
  704. #define GPIO_GPIO_IS_IS_S 0
  705. //******************************************************************************
  706. //
  707. // The following are defines for the bit fields in the GPIO_O_GPIO_IBE register.
  708. //
  709. //******************************************************************************
  710. #define GPIO_GPIO_IBE_IBE_M 0x000000FF // GPIO Interrupt Both Edges Value
  711. // Description 0 Interrupt
  712. // generation is controlled by the
  713. // GPIO Interrupt Event (GPIOIEV)
  714. // register. 1 Both edges on the
  715. // corresponding pin trigger an
  716. // interrupt.
  717. #define GPIO_GPIO_IBE_IBE_S 0
  718. //******************************************************************************
  719. //
  720. // The following are defines for the bit fields in the GPIO_O_GPIO_IEV register.
  721. //
  722. //******************************************************************************
  723. #define GPIO_GPIO_IEV_IEV_M 0x000000FF // GPIO Interrupt Event Value
  724. // Description 1 A falling edge or a
  725. // Low level on the corresponding
  726. // pin triggers an interrupt. 0 A
  727. // rising edge or a High level on
  728. // the corresponding pin triggers an
  729. // interrupt.
  730. #define GPIO_GPIO_IEV_IEV_S 0
  731. //******************************************************************************
  732. //
  733. // The following are defines for the bit fields in the GPIO_O_GPIO_IM register.
  734. //
  735. //******************************************************************************
  736. #define GPIO_GPIO_IM_IME_M 0x000000FF // GPIO Interrupt Mask Enable Value
  737. // Description 0 The interrupt from
  738. // the corresponding pin is masked.
  739. // 1 The interrupt from the
  740. // corresponding pin is sent to the
  741. // interrupt controller.
  742. #define GPIO_GPIO_IM_IME_S 0
  743. //******************************************************************************
  744. //
  745. // The following are defines for the bit fields in the GPIO_O_GPIO_RIS register.
  746. //
  747. //******************************************************************************
  748. #define GPIO_GPIO_RIS_RIS_M 0x000000FF // GPIO Interrupt Raw Status Value
  749. // Description 1 An interrupt
  750. // condition has occurred on the
  751. // corresponding pin. 0 interrupt
  752. // condition has not occurred on the
  753. // corresponding pin. A bit is
  754. // cleared by writing a 1 to the
  755. // corresponding bit in the GPIOICR
  756. // register.
  757. #define GPIO_GPIO_RIS_RIS_S 0
  758. //******************************************************************************
  759. //
  760. // The following are defines for the bit fields in the GPIO_O_GPIO_MIS register.
  761. //
  762. //******************************************************************************
  763. #define GPIO_GPIO_MIS_MIS_M 0x000000FF // GPIO Masked Interrupt Status
  764. // Value Description 1 An interrupt
  765. // condition on the corresponding
  766. // pin has triggered an interrupt to
  767. // the interrupt controller. 0 An
  768. // interrupt condition on the
  769. // corresponding pin is masked or
  770. // has not occurred. A bit is
  771. // cleared by writing a 1 to the
  772. // corresponding bit in the GPIOICR
  773. // register.
  774. #define GPIO_GPIO_MIS_MIS_S 0
  775. //******************************************************************************
  776. //
  777. // The following are defines for the bit fields in the GPIO_O_GPIO_ICR register.
  778. //
  779. //******************************************************************************
  780. #define GPIO_GPIO_ICR_IC_M 0x000000FF // GPIO Interrupt Clear Value
  781. // Description 1 The corresponding
  782. // interrupt is cleared. 0 The
  783. // corresponding interrupt is
  784. // unaffected.
  785. #define GPIO_GPIO_ICR_IC_S 0
  786. //******************************************************************************
  787. //
  788. // The following are defines for the bit fields in the GPIO_O_GPIO_AFSEL register.
  789. //
  790. //******************************************************************************
  791. //******************************************************************************
  792. //
  793. // The following are defines for the bit fields in the GPIO_O_GPIO_DR2R register.
  794. //
  795. //******************************************************************************
  796. #define GPIO_GPIO_DR2R_DRV2_M 0x000000FF // This register is not used in
  797. // cc3xx. equivalant register exsist
  798. // outside GPIO IP (refer
  799. // PAD*_config register in the
  800. // shared comn space) Output Pad
  801. // 2-mA Drive Enable Value
  802. // Description 1 The corresponding
  803. // GPIO pin has 2-mA drive. The
  804. // drive for the corresponding GPIO
  805. // pin is controlled by the GPIODR4R
  806. // or GPIODR8R register. 0 Setting a
  807. // bit in either the GPIODR4
  808. // register or the GPIODR8 register
  809. // clears the corresponding 2-mA
  810. // enable bit. The change is
  811. // effective on the second clock
  812. // cycle after the write if
  813. // accessing GPIO via the APB memory
  814. // aperture. If using AHB access@@
  815. // the change is effective on the
  816. // next clock cycle.
  817. #define GPIO_GPIO_DR2R_DRV2_S 0
  818. //******************************************************************************
  819. //
  820. // The following are defines for the bit fields in the GPIO_O_GPIO_DR4R register.
  821. //
  822. //******************************************************************************
  823. #define GPIO_GPIO_DR4R_DRV4_M 0x000000FF // This register is not used in
  824. // cc3xx. equivalant register exsist
  825. // outside GPIO IP (refer
  826. // PAD*_config register in the
  827. // shared comn space) Output Pad
  828. // 4-mA Drive Enable Value
  829. // Description 1 The corresponding
  830. // GPIO pin has 4-mA drive. The
  831. // drive for the corresponding GPIO
  832. // pin is controlled by the GPIODR2R
  833. // or GPIODR8R register. 0 Setting a
  834. // bit in either the GPIODR2
  835. // register or the GPIODR8 register
  836. // clears the corresponding 4-mA
  837. // enable bit. The change is
  838. // effective on the second clock
  839. // cycle after the write if
  840. // accessing GPIO via the APB memory
  841. // aperture. If using AHB access@@
  842. // the change is effective on the
  843. // next clock cycle.
  844. #define GPIO_GPIO_DR4R_DRV4_S 0
  845. //******************************************************************************
  846. //
  847. // The following are defines for the bit fields in the GPIO_O_GPIO_DR8R register.
  848. //
  849. //******************************************************************************
  850. #define GPIO_GPIO_DR8R_DRV8_M 0x000000FF // This register is not used in
  851. // cc3xx. equivalant register exsist
  852. // outside GPIO IP (refer
  853. // PAD*_config register in the
  854. // shared comn space) Output Pad
  855. // 8-mA Drive Enable Value
  856. // Description 1 The corresponding
  857. // GPIO pin has 8-mA drive. The
  858. // drive for the corresponding GPIO
  859. // pin is controlled by the GPIODR2R
  860. // or GPIODR4R register. 0 Setting a
  861. // bit in either the GPIODR2
  862. // register or the GPIODR4 register
  863. // clears the corresponding 8-mA
  864. // enable bit. The change is
  865. // effective on the second clock
  866. // cycle after the write if
  867. // accessing GPIO via the APB memory
  868. // aperture. If using AHB access@@
  869. // the change is effective on the
  870. // next clock cycle.
  871. #define GPIO_GPIO_DR8R_DRV8_S 0
  872. //******************************************************************************
  873. //
  874. // The following are defines for the bit fields in the GPIO_O_GPIO_ODR register.
  875. //
  876. //******************************************************************************
  877. #define GPIO_GPIO_ODR_ODE_M 0x000000FF // This register is not used in
  878. // cc3xx. equivalant register exsist
  879. // outside GPIO IP (refer
  880. // PAD*_config register in the
  881. // shared comn space) Output Pad
  882. // Open Drain Enable Value
  883. // Description 1 The corresponding
  884. // pin is configured as open drain.
  885. // 0 The corresponding pin is not
  886. // configured as open drain.
  887. #define GPIO_GPIO_ODR_ODE_S 0
  888. //******************************************************************************
  889. //
  890. // The following are defines for the bit fields in the GPIO_O_GPIO_PUR register.
  891. //
  892. //******************************************************************************
  893. #define GPIO_GPIO_PUR_PUE_M 0x000000FF // This register is not used in
  894. // cc3xx. equivalant register exsist
  895. // outside GPIO IP (refer
  896. // PAD*_config register in the
  897. // shared comn space) Pad Weak
  898. // Pull-Up Enable Value Description
  899. // 1 The corresponding pin has a
  900. // weak pull-up resistor. 0 The
  901. // corresponding pin is not
  902. // affected. Setting a bit in the
  903. // GPIOPDR register clears the
  904. // corresponding bit in the GPIOPUR
  905. // register. The change is effective
  906. // on the second clock cycle after
  907. // the write if accessing GPIO via
  908. // the APB memory aperture. If using
  909. // AHB access@@ the change is
  910. // effective on the next clock
  911. // cycle.
  912. #define GPIO_GPIO_PUR_PUE_S 0
  913. //******************************************************************************
  914. //
  915. // The following are defines for the bit fields in the GPIO_O_GPIO_PDR register.
  916. //
  917. //******************************************************************************
  918. #define GPIO_GPIO_PDR_PDE_M 0x000000FF // This register is not used in
  919. // cc3xx. equivalant register exsist
  920. // outside GPIO IP (refer
  921. // PAD*_config register in the
  922. // shared comn space) Pad Weak
  923. // Pull-Down Enable Value
  924. // Description 1 The corresponding
  925. // pin has a weak pull-down
  926. // resistor. 0 The corresponding pin
  927. // is not affected. Setting a bit in
  928. // the GPIOPUR register clears the
  929. // corresponding bit in the GPIOPDR
  930. // register. The change is effective
  931. // on the second clock cycle after
  932. // the write if accessing GPIO via
  933. // the APB memory aperture. If using
  934. // AHB access@@ the change is
  935. // effective on the next clock
  936. // cycle.
  937. #define GPIO_GPIO_PDR_PDE_S 0
  938. //******************************************************************************
  939. //
  940. // The following are defines for the bit fields in the GPIO_O_GPIO_SLR register.
  941. //
  942. //******************************************************************************
  943. #define GPIO_GPIO_SLR_SRL_M 0x000000FF // This register is not used in
  944. // cc3xx. equivalant register exsist
  945. // outside GPIO IP (refer
  946. // PAD*_config register in the
  947. // shared comn space) Slew Rate
  948. // Limit Enable (8-mA drive only)
  949. // Value Description 1 Slew rate
  950. // control is enabled for the
  951. // corresponding pin. 0 Slew rate
  952. // control is disabled for the
  953. // corresponding pin.
  954. #define GPIO_GPIO_SLR_SRL_S 0
  955. //******************************************************************************
  956. //
  957. // The following are defines for the bit fields in the GPIO_O_GPIO_DEN register.
  958. //
  959. //******************************************************************************
  960. #define GPIO_GPIO_DEN_DEN_M 0x000000FF // This register is not used in
  961. // cc3xx. equivalant register exsist
  962. // outside GPIO IP (refer
  963. // PAD*_config register in the
  964. // shared comn space) Digital Enable
  965. // Value Description 0 The digital
  966. // functions for the corresponding
  967. // pin are disabled. 1 The digital
  968. // functions for the corresponding
  969. // pin are enabled.
  970. #define GPIO_GPIO_DEN_DEN_S 0
  971. //******************************************************************************
  972. //
  973. // The following are defines for the bit fields in the GPIO_O_GPIO_LOCK register.
  974. //
  975. //******************************************************************************
  976. #define GPIO_GPIO_LOCK_LOCK_M 0xFFFFFFFF // This register is not used in
  977. // cc3xx. GPIO Lock A write of the
  978. // value 0x4C4F.434B unlocks the
  979. // GPIO Commit (GPIOCR) register for
  980. // write access.A write of any other
  981. // value or a write to the GPIOCR
  982. // register reapplies the lock@@
  983. // preventing any register updates.
  984. // A read of this register returns
  985. // the following values: Value
  986. // Description 0x1 The GPIOCR
  987. // register is locked and may not be
  988. // modified. 0x0 The GPIOCR register
  989. // is unlocked and may be modified.
  990. #define GPIO_GPIO_LOCK_LOCK_S 0
  991. //******************************************************************************
  992. //
  993. // The following are defines for the bit fields in the GPIO_O_GPIO_CR register.
  994. //
  995. //******************************************************************************
  996. #define GPIO_GPIO_CR_CR_M 0x000000FF // This register is not used in
  997. // cc3xx. equivalant register exsist
  998. // outside GPIO IP (refer
  999. // PAD*_config register in the
  1000. // shared comn space) GPIO Commit
  1001. // Value Description The
  1002. // corresponding GPIOAFSEL@@
  1003. // GPIOPUR@@ GPIOPDR@@ or GPIODEN
  1004. // bits can be written. 1 The
  1005. // corresponding GPIOAFSEL@@
  1006. // GPIOPUR@@ GPIOPDR@@ or GPIODEN
  1007. // bits cannot be written. 0 Note:
  1008. // The default register type for the
  1009. // GPIOCR register is RO for all
  1010. // GPIO pins with the exception of
  1011. // the NMI pin and the four JTAG/SWD
  1012. // pins (PD7@@ PF0@@ and PC[3:0]).
  1013. // These six pins are the only GPIOs
  1014. // that are protected by the GPIOCR
  1015. // register. Because of this@@ the
  1016. // register type for GPIO Port D7@@
  1017. // GPIO Port F0@@ and GPIO Port
  1018. // C[3:0] is R/W. The default reset
  1019. // value for the GPIOCR register is
  1020. // 0x0000.00FF for all GPIO pins@@
  1021. // with the exception of the NMI pin
  1022. // and the four JTAG/SWD pins (PD7@@
  1023. // PF0@@ and PC[3:0]). To ensure
  1024. // that the JTAG port is not
  1025. // accidentally programmed as GPIO
  1026. // pins@@ the PC[3:0] pins default
  1027. // to non-committable. Similarly@@
  1028. // to ensure that the NMI pin is not
  1029. // accidentally programmed as a GPIO
  1030. // pin@@ the PD7 and PF0 pins
  1031. // default to non-committable.
  1032. // Because of this@@ the default
  1033. // reset value of GPIOCR for GPIO
  1034. // Port C is 0x0000.00F0@@ for GPIO
  1035. // Port D is 0x0000.007F@@ and for
  1036. // GPIO Port F is 0x0000.00FE.
  1037. #define GPIO_GPIO_CR_CR_S 0
  1038. //******************************************************************************
  1039. //
  1040. // The following are defines for the bit fields in the GPIO_O_GPIO_AMSEL register.
  1041. //
  1042. //******************************************************************************
  1043. #define GPIO_GPIO_AMSEL_GPIO_AMSEL_M \
  1044. 0x000000FF // This register is not used in
  1045. // cc3xx. equivalant register exsist
  1046. // outside GPIO IP (refer
  1047. // PAD*_config register in the
  1048. // shared comn space) GPIO Analog
  1049. // Mode Select Value Description 1
  1050. // The analog function of the pin is
  1051. // enabled@@ the isolation is
  1052. // disabled@@ and the pin is capable
  1053. // of analog functions. 0 The analog
  1054. // function of the pin is disabled@@
  1055. // the isolation is enabled@@ and
  1056. // the pin is capable of digital
  1057. // functions as specified by the
  1058. // other GPIO configuration
  1059. // registers. Note: This register
  1060. // and bits are only valid for GPIO
  1061. // signals that share analog
  1062. // function through a unified I/O
  1063. // pad. The reset state of this
  1064. // register is 0 for all signals.
  1065. #define GPIO_GPIO_AMSEL_GPIO_AMSEL_S 0
  1066. //******************************************************************************
  1067. //
  1068. // The following are defines for the bit fields in the GPIO_O_GPIO_PCTL register.
  1069. //
  1070. //******************************************************************************
  1071. #define GPIO_GPIO_PCTL_PMC7_M 0xF0000000 // This register is not used in
  1072. // cc3xx. equivalant register exsist
  1073. // outside GPIO IP (refer
  1074. // PAD*_config register in the
  1075. // shared comn space) Port Mux
  1076. // Control 7 This field controls the
  1077. // configuration for GPIO pin 7.
  1078. #define GPIO_GPIO_PCTL_PMC7_S 28
  1079. #define GPIO_GPIO_PCTL_PMC6_M 0x0F000000 // This register is not used in
  1080. // cc3xx. equivalant register exsist
  1081. // outside GPIO IP (refer
  1082. // PAD*_config register in the
  1083. // shared comn space) Port Mux
  1084. // Control 6 This field controls the
  1085. // configuration for GPIO pin 6.
  1086. #define GPIO_GPIO_PCTL_PMC6_S 24
  1087. #define GPIO_GPIO_PCTL_PMC5_M 0x00F00000 // This register is not used in
  1088. // cc3xx. equivalant register exsist
  1089. // outside GPIO IP (refer
  1090. // PAD*_config register in the
  1091. // shared comn space) Port Mux
  1092. // Control 5 This field controls the
  1093. // configuration for GPIO pin 5.
  1094. #define GPIO_GPIO_PCTL_PMC5_S 20
  1095. #define GPIO_GPIO_PCTL_PMC4_M 0x000F0000 // This register is not used in
  1096. // cc3xx. equivalant register exsist
  1097. // outside GPIO IP (refer
  1098. // PAD*_config register in the
  1099. // shared comn space) Port Mux
  1100. // Control 4 This field controls the
  1101. // configuration for GPIO pin 4.
  1102. #define GPIO_GPIO_PCTL_PMC4_S 16
  1103. #define GPIO_GPIO_PCTL_PMC3_M 0x0000F000 // This register is not used in
  1104. // cc3xx. equivalant register exsist
  1105. // outside GPIO IP (refer
  1106. // PAD*_config register in the
  1107. // shared comn space) Port Mux
  1108. // Control 43 This field controls
  1109. // the configuration for GPIO pin 3.
  1110. #define GPIO_GPIO_PCTL_PMC3_S 12
  1111. #define GPIO_GPIO_PCTL_PMC1_M 0x00000F00 // This register is not used in
  1112. // cc3xx. equivalant register exsist
  1113. // outside GPIO IP (refer
  1114. // PAD*_config register in the
  1115. // shared comn space) Port Mux
  1116. // Control 1 This field controls the
  1117. // configuration for GPIO pin 1.
  1118. #define GPIO_GPIO_PCTL_PMC1_S 8
  1119. #define GPIO_GPIO_PCTL_PMC2_M 0x000000F0 // This register is not used in
  1120. // cc3xx. equivalant register exsist
  1121. // outside GPIO IP (refer
  1122. // PAD*_config register in the
  1123. // shared comn space) Port Mux
  1124. // Control 2 This field controls the
  1125. // configuration for GPIO pin 2.
  1126. #define GPIO_GPIO_PCTL_PMC2_S 4
  1127. #define GPIO_GPIO_PCTL_PMC0_M 0x0000000F // This register is not used in
  1128. // cc3xx. equivalant register exsist
  1129. // outside GPIO IP (refer
  1130. // PAD*_config register in the
  1131. // shared comn space) Port Mux
  1132. // Control 0 This field controls the
  1133. // configuration for GPIO pin 0.
  1134. #define GPIO_GPIO_PCTL_PMC0_S 0
  1135. //******************************************************************************
  1136. //
  1137. // The following are defines for the bit fields in the
  1138. // GPIO_O_GPIO_ADCCTL register.
  1139. //
  1140. //******************************************************************************
  1141. #define GPIO_GPIO_ADCCTL_ADCEN_M \
  1142. 0x000000FF // This register is not used in
  1143. // cc3xx. ADC trigger via GPIO is
  1144. // not supported. ADC Trigger Enable
  1145. // Value Description 1 The
  1146. // corresponding pin is used to
  1147. // trigger the ADC. 0 The
  1148. // corresponding pin is not used to
  1149. // trigger the ADC.
  1150. #define GPIO_GPIO_ADCCTL_ADCEN_S 0
  1151. //******************************************************************************
  1152. //
  1153. // The following are defines for the bit fields in the
  1154. // GPIO_O_GPIO_DMACTL register.
  1155. //
  1156. //******************************************************************************
  1157. #define GPIO_GPIO_DMACTL_DMAEN_M \
  1158. 0x000000FF // This register is not used in the
  1159. // cc3xx. Alternate register to
  1160. // support this feature is coded in
  1161. // the APPS_NWP_CMN space. refer
  1162. // register as offset 0x400F70D8
  1163. // ?DMA Trigger Enable Value
  1164. // Description 1 The corresponding
  1165. // pin is used to trigger the ?DMA.
  1166. // 0 The corresponding pin is not
  1167. // used to trigger the ?DMA.
  1168. #define GPIO_GPIO_DMACTL_DMAEN_S 0
  1169. //******************************************************************************
  1170. //
  1171. // The following are defines for the bit fields in the GPIO_O_GPIO_SI register.
  1172. //
  1173. //******************************************************************************
  1174. #define GPIO_GPIO_SI_SUM 0x00000001 // Summary Interrupt Value
  1175. // Description 1 Each pin has its
  1176. // own interrupt vector. 0 All port
  1177. // pin interrupts are OR'ed together
  1178. // to produce a summary interrupt.
  1179. //******************************************************************************
  1180. //
  1181. // The following are defines for the bit fields in the
  1182. // GPIO_O_GPIO_PERIPHID4 register.
  1183. //
  1184. //******************************************************************************
  1185. #define GPIO_GPIO_PERIPHID4_PID4_M \
  1186. 0x000000FF // This register is not used in
  1187. // CC3XX. GPIO Peripheral ID
  1188. // Register [7:0]
  1189. #define GPIO_GPIO_PERIPHID4_PID4_S 0
  1190. //******************************************************************************
  1191. //
  1192. // The following are defines for the bit fields in the
  1193. // GPIO_O_GPIO_PERIPHID5 register.
  1194. //
  1195. //******************************************************************************
  1196. #define GPIO_GPIO_PERIPHID5_PID5_M \
  1197. 0x000000FF // This register is not used in
  1198. // CC3XX. GPIO Peripheral ID
  1199. // Register [15:8]
  1200. #define GPIO_GPIO_PERIPHID5_PID5_S 0
  1201. //******************************************************************************
  1202. //
  1203. // The following are defines for the bit fields in the
  1204. // GPIO_O_GPIO_PERIPHID6 register.
  1205. //
  1206. //******************************************************************************
  1207. #define GPIO_GPIO_PERIPHID6_PID6_M \
  1208. 0x000000FF // This register is not used in
  1209. // CC3XX. GPIO Peripheral ID
  1210. // Register [23:16]
  1211. #define GPIO_GPIO_PERIPHID6_PID6_S 0
  1212. //******************************************************************************
  1213. //
  1214. // The following are defines for the bit fields in the
  1215. // GPIO_O_GPIO_PERIPHID7 register.
  1216. //
  1217. //******************************************************************************
  1218. #define GPIO_GPIO_PERIPHID7_PID7_M \
  1219. 0x000000FF // This register is not used in
  1220. // CC3XX. GPIO Peripheral ID
  1221. // Register [31:24]
  1222. #define GPIO_GPIO_PERIPHID7_PID7_S 0
  1223. //******************************************************************************
  1224. //
  1225. // The following are defines for the bit fields in the
  1226. // GPIO_O_GPIO_PERIPHID0 register.
  1227. //
  1228. //******************************************************************************
  1229. #define GPIO_GPIO_PERIPHID0_PID0_M \
  1230. 0x000000FF // This register is not used in
  1231. // CC3XX. GPIO Peripheral ID
  1232. // Register [7:0] Can be used by
  1233. // software to identify the presence
  1234. // of this peripheral.
  1235. #define GPIO_GPIO_PERIPHID0_PID0_S 0
  1236. //******************************************************************************
  1237. //
  1238. // The following are defines for the bit fields in the
  1239. // GPIO_O_GPIO_PERIPHID1 register.
  1240. //
  1241. //******************************************************************************
  1242. #define GPIO_GPIO_PERIPHID1_PID1_M \
  1243. 0x000000FF // GPIO Peripheral ID Register
  1244. // [15:8] Can be used by software to
  1245. // identify the presence of this
  1246. // peripheral.
  1247. #define GPIO_GPIO_PERIPHID1_PID1_S 0
  1248. //******************************************************************************
  1249. //
  1250. // The following are defines for the bit fields in the
  1251. // GPIO_O_GPIO_PERIPHID2 register.
  1252. //
  1253. //******************************************************************************
  1254. #define GPIO_GPIO_PERIPHID2_PID2_M \
  1255. 0x000000FF // This register is not used in
  1256. // CC3XX.v GPIO Peripheral ID
  1257. // Register [23:16] Can be used by
  1258. // software to identify the presence
  1259. // of this peripheral.
  1260. #define GPIO_GPIO_PERIPHID2_PID2_S 0
  1261. //******************************************************************************
  1262. //
  1263. // The following are defines for the bit fields in the
  1264. // GPIO_O_GPIO_PERIPHID3 register.
  1265. //
  1266. //******************************************************************************
  1267. #define GPIO_GPIO_PERIPHID3_PID3_M \
  1268. 0x000000FF // This register is not used in
  1269. // CC3XX. GPIO Peripheral ID
  1270. // Register [31:24] Can be used by
  1271. // software to identify the presence
  1272. // of this peripheral.
  1273. #define GPIO_GPIO_PERIPHID3_PID3_S 0
  1274. //******************************************************************************
  1275. //
  1276. // The following are defines for the bit fields in the
  1277. // GPIO_O_GPIO_PCELLID0 register.
  1278. //
  1279. //******************************************************************************
  1280. #define GPIO_GPIO_PCELLID0_CID0_M \
  1281. 0x000000FF // This register is not used in
  1282. // CC3XX. GPIO PrimeCell ID Register
  1283. // [7:0] Provides software a
  1284. // standard cross-peripheral
  1285. // identification system.
  1286. #define GPIO_GPIO_PCELLID0_CID0_S 0
  1287. //******************************************************************************
  1288. //
  1289. // The following are defines for the bit fields in the
  1290. // GPIO_O_GPIO_PCELLID1 register.
  1291. //
  1292. //******************************************************************************
  1293. #define GPIO_GPIO_PCELLID1_CID1_M \
  1294. 0x000000FF // This register is not used in
  1295. // CC3XX. GPIO PrimeCell ID Register
  1296. // [15:8] Provides software a
  1297. // standard cross-peripheral
  1298. // identification system.
  1299. #define GPIO_GPIO_PCELLID1_CID1_S 0
  1300. //******************************************************************************
  1301. //
  1302. // The following are defines for the bit fields in the
  1303. // GPIO_O_GPIO_PCELLID2 register.
  1304. //
  1305. //******************************************************************************
  1306. #define GPIO_GPIO_PCELLID2_CID2_M \
  1307. 0x000000FF // This register is not used in
  1308. // CC3XX. GPIO PrimeCell ID Register
  1309. // [23:16] Provides software a
  1310. // standard cross-peripheral
  1311. // identification system.
  1312. #define GPIO_GPIO_PCELLID2_CID2_S 0
  1313. //******************************************************************************
  1314. //
  1315. // The following are defines for the bit fields in the
  1316. // GPIO_O_GPIO_PCELLID3 register.
  1317. //
  1318. //******************************************************************************
  1319. #define GPIO_GPIO_PCELLID3_CID3_M \
  1320. 0x000000FF // This register is not used in
  1321. // CC3XX. GPIO PrimeCell ID Register
  1322. // [31:24] Provides software a
  1323. // standard cross-peripheral
  1324. // identification system.
  1325. #define GPIO_GPIO_PCELLID3_CID3_S 0
  1326. #endif // __HW_GPIO_H__