OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [lwIP_Demo_Rowley_ARM7/] [AT91SAM7_Target.js] - Blame information for rev 603

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 583 jeremybenn
/******************************************************************************
2
  Target Script for ATMEL AT91SAM7.
3
 
4
  Copyright (c) 2004 Rowley Associates Limited.
5
 
6
  This file may be distributed under the terms of the License Agreement
7
  provided with this software.
8
 
9
  THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
10
  WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11
 ******************************************************************************/
12
 
13
function Reset()
14
{
15
  /* Reset and stop target */
16
  TargetInterface.pokeWord(0xFFFFFD00, 0xA500000D); // RSTC_CR
17
  TargetInterface.waitForDebugState(1000);
18
  /* Configure Clock */
19
  TargetInterface.pokeWord(0xFFFFFC20, 0x00000601); // CKGR_MOR
20
  TargetInterface.delay(10);
21
  TargetInterface.pokeWord(0xFFFFFC2C, 0x00191C05); // CKGR_PLLR
22
  TargetInterface.delay(10);
23
  TargetInterface.pokeWord(0xFFFFFC30, 0x00000007); // CKGR_MCKR
24
  TargetInterface.delay(10);
25
}
26
 
27
function RAMReset()
28
{
29
  Reset();
30
  /* Remap SRAM to 0x00000000 */
31
  TargetInterface.pokeWord(0xFFFFFF00, 1); // MC_RCR 
32
}
33
 
34
function FLASHReset()
35
{
36
  Reset();
37
 
38
// Mask All interrupt pAic->AIC_IDCR = 0xFFFFFFFF;
39
 
40
    TargetInterface.pokeWord(0xffffffff,0xFFFFF124);
41
    TargetInterface.pokeWord(0xffffffff,0xFFFFF128);
42
// disable peripheral clock  Peripheral Clock Disable Register
43
    TargetInterface.pokeWord(0xffffffff,0xFFFFFC14);
44
 
45
// #define AT91C_TC0_SR    ((AT91_REG *)        0xFFFA0020) // (TC0) Status Register
46
// #define AT91C_TC1_SR    ((AT91_REG *)        0xFFFA0060) // (TC1) Status Register
47
// #define AT91C_TC2_SR    ((AT91_REG *)        0xFFFA00A0) // (TC2) Status Register
48
    TargetInterface.peekWord(0xFFFA0020);
49
    TargetInterface.peekWord(0xFFFA0060);
50
    TargetInterface.peekWord(0xFFFA00A0);
51
 
52
//    for (__mac_i=0;__mac_i < 8; __mac_i++)
53
//    {
54
      // AT91C_BASE_AIC->AIC_EOICR
55
//      __mac_pt  =  TargetInterface.peekWord(0xFFFFF130);
56
 
57
//    }
58
//   __message "------------------------------- AIC 2 INIT ---------------------------------------------";  
59
 
60
}
61
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.