AT91SAM7.setup 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*********************************************************************
  2. *
  3. * JLink setup file - Generated by J-Flash ARM V2.16b
  4. *
  5. * Syntax:
  6. * SetJTAGSpeed(x); // Sets the JTAG speed, x = speed in kHz (0 = Auto)
  7. * Delay(x); // Waits a given time, x = delay in milliseconds
  8. * DisableMMU(); // Disables the MMU
  9. * Go(); // Starts the ARM core
  10. * Halt(); // Halts the ARM core
  11. * Reset(x); // Resets the target, x = delay in milliseconds
  12. * ResetBP0(x); // Resets the target using breakpoint at address 0
  13. * ResetADI(x); // Resets the target using ADI software reset
  14. * Read8(Addr); // Reads a 8/16/32 bit value,
  15. * Read16(Addr); // Addr = address to read (as hex value)
  16. * Read32(Addr);
  17. * Verify8(Addr, Data); // Verifies a 8/16/32 bit value,
  18. * Verify16(Addr, Data); // Addr = address to verify (as hex value)
  19. * Verify32(Addr, Data); // Data = data to verify (as hex value)
  20. * Write8(Addr, Data); // Writes a 8/16/32 bit value,
  21. * Write16(Addr, Data); // Addr = address to write (as hex value)
  22. * Write32(Addr, Data); // Data = data to write (as hex value)
  23. * WriteVerify8(Addr, Data); // Writes and verifies a 8/16/32 bit value,
  24. * WriteVerify16(Addr, Data); // Addr = address to write (as hex value)
  25. * WriteVerify32(Addr, Data); // Data = data to write (as hex value)
  26. * WriteRegister(Reg, Data); // Writes a register
  27. * WriteJTAG_IR(Cmd); // Writes the JTAG instruction register
  28. * WriteJTAG_DR(nBits, Data); // Writes the JTAG data register
  29. *
  30. **********************************************************************
  31. */
  32. SetJTAGSpeed(30);
  33. Reset(20);
  34. Write32(0xFFFFFD44, 0x00008000); // Disable watchdog
  35. Write32(0xFFFFFF60, 0x00320300); // Set flash wait states
  36. Write32(0xFFFFFC20, 0x00000601); // Set PLL
  37. Delay(200);
  38. Write32(0xFFFFFC2C, 0x00191C05); // Set PLL and divider
  39. Delay(200);
  40. Write32(0xFFFFFC30, 0x00000007); // Select master clock and processor clock
  41. SetJTAGSpeed(4000);