max3263x.cfg 776 Bytes
Newer Older
1
2
3
# Maxim Integrated MAX3263X OpenOCD target configuration file
# www.maximintegrated.com

4
5
# Set the reset pin configuration
reset_config none
6

7
8
9
10
11
12
# Set flash parameters
set FLASH_BASE 0x0
set FLASH_SIZE 0x200000
set FLC_BASE 0x40002000
set FLASH_SECTOR 0x2000
set FLASH_CLK 96
13
set FLASH_OPTIONS 0x00
14

15
16
17
18
19
20
21
22
23
24
25
# Setup the reserved TAP
set RSV_TAP 1

source [find target/max32xxx.cfg]

# Create custom reset sequence
$_CHIPNAME.cpu configure -event reset-init {

    # Reset the peripherals
    mww 0x40000848 0xFFFFFFFF
    mww 0x4000084C 0xFFFFFFFF
26

27
28
29
30
31
32
33
34
35
36
37
38
39
    sleep 10

    mww 0x40000848 0x0
    mww 0x4000084C 0x0

    # Reset the SP
    set SP_ADDR [mrw 0x4]
    reg sp $SP_ADDR

    # Reset the PC to the Reset_Handler
    set RESET_HANDLER_ADDR  [mrw 0x4]
    reg pc $RESET_HANDLER_ADDR
}