Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN3995 Datasheet(PDF) 39 Page - STMicroelectronics

Part # AN3995
Description  Getting started tutorial
PDF  49 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3995 Datasheet(HTML) 39 Page - STMicroelectronics

Back Button AN3995 Datasheet HTML 35Page - STMicroelectronics AN3995 Datasheet HTML 36Page - STMicroelectronics AN3995 Datasheet HTML 37Page - STMicroelectronics AN3995 Datasheet HTML 38Page - STMicroelectronics AN3995 Datasheet HTML 39Page - STMicroelectronics AN3995 Datasheet HTML 40Page - STMicroelectronics AN3995 Datasheet HTML 41Page - STMicroelectronics AN3995 Datasheet HTML 42Page - STMicroelectronics AN3995 Datasheet HTML 43Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 39 / 49 page
background image
AN3995
Application code example
Doc ID 022384 Rev 2
39/49
__ghs_board_memory_init:
#/**************************************************************************/
#/* MMU configuration code for SRAM
*/
#/* TLB1, Entry 1 128KB 0x4000_0000 to 0x4001_FFFF
*/
#/**************************************************************************/
e_lis r3, 0x1001
mtmas0 r3
#/* MAS0 */
e_lis r3, 0xC000
e_or2i r3, 0x0380
mtmas1 r3
#/* MAS1 = 0xC0000380 (128Kb) */
e_lis r3, 0x4000
e_or2i r3, 0x0028
mtmas2 r3
#/* MAS2 = 0x40000028 */
e_lis r3, 0x4000
e_or2i r3, 0x003F
mtmas3 r3
#/* MAS3 = 0x4000003F */
tlbwe
#/* Write the entry to the TLB */
#/**************************************************************************/
#/* MMU configuration code for Peripheral Area (IPBridge)
*/
#/* TLB1, entry 2 1GB 0xC000_0000 to 0xFFFF_FFFF
*/
#/**************************************************************************/
e_lis r3, 0x1002 #/* MAS0, Configure TLB1, Entry 2 */
mtmas0 r3
e_lis r3, 0xC000 #/* MAS1 = 0xC0000A00 */
e_or2i r3, 0x0A00
mtmas1 r3
e_lis r3, 0xC000 #/* MAS2 = 0xC000002A */
e_or2i r3, 0x002A
mtmas2 r3
e_lis r3, 0xC000 #/* MAS3 = 0xC000003F */
e_or2i r3, 0x003F
mtmas3 r3
tlbwe
#/* Write the entry to the TLB */
#/**************************************************************************/
#/* Initialize all SRAM space by copying all 32GPR's to RAM (fast)
*/
#/* Counter defines number of 32 x 32-bit words needed to write to RAM
*/
#/**************************************************************************/
e_lis
r5, _SRAM_ADDR_Z4@h
#/* SRAM start address defined in the linker file */
e_or2i
r5, _SRAM_ADDR_Z4@l
e_lis
r6, _SRAM_SIZE_Z4@h
#/* SRAM size defined in the linker file */
e_or2i
r6, _SRAM_SIZE_Z4@l
e_srwi
r6, r6, 0x7
#/* Divide SRAM size by 128 bytes */
mtctr
r6
#/* Move to counter for use with "bdnz" */
sram_loop:
e_stmw
r0,0x0(r5)
#/* Write all 32 registers to SRAM */
e_addi
r5,r5,128
#/* Increment the RAM pointer to next
*/
#/* 128byte(4bytes*32 registers) */
e_bdnz
sram_loop
#/* Loop for all of SRAM */
#/**************************************************************************/
#/* Flash Wait States and MMU configurations code will be copied to SRAM*/
#/* to avoid inconsistencies
*/



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com