Hi,
I just purchased those items, and after many attempts, I can’t probe the flash.
I use OpenOCD 657 and here is my configuration file :
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout jtagkey
jtag_speed 10
jtag_nsrst_delay 200
jtag_ntrst_delay 200
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
jtag_device 5 0x1 0x1 0x1e
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target cortex_m3 <endianness> <reset mode> <chainpos> <variant>
target cortex_m3 little reset_halt 0
run_and_halt_time 0 30
# working_area 0 0x20000000 16384 nobackup
working_area 0 0x20000000 0x4000 nobackup
#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank stm32x 0x08000000 0x00010000 0 0 0
When I run OpenOCD, here is what I get at the end :
Debug: 113 1593 cortex_m3.c:403 cortex_m3_poll(): Exit from reset with dcb_dhcsr 0x30003
Debug: 114 1593 cortex_m3.c:178 cortex_m3_endreset_event(): DCB_DEMCR = 0x01000501
Debug: 115 1593 target.c:1217 target_write_u32(): address: 0xe0002000, value: 0x00000003
Debug: 116 1593 target.c:1217 target_write_u32(): address: 0xe0002008, value: 0x00000000
Debug: 117 1609 target.c:1217 target_write_u32(): address: 0xe000200c, value: 0x00000000
Debug: 118 1609 target.c:1217 target_write_u32(): address: 0xe0002010, value: 0x00000000
Debug: 119 1609 target.c:1217 target_write_u32(): address: 0xe0002014, value: 0x00000000
Debug: 120 1609 target.c:1217 target_write_u32(): address: 0xe0002018, value: 0x00000000
Debug: 121 1609 target.c:1217 target_write_u32(): address: 0xe000201c, value: 0x00000000
Debug: 122 1609 target.c:1217 target_write_u32(): address: 0xe0002020, value: 0x00000000
Debug: 123 1625 target.c:1217 target_write_u32(): address: 0xe0002024, value: 0x00000000
Debug: 124 1625 target.c:1217 target_write_u32(): address: 0xe0001020, value: 0x00000000
Debug: 125 1625 target.c:1217 target_write_u32(): address: 0xe0001024, value: 0x00000000
Debug: 126 1625 target.c:1217 target_write_u32(): address: 0xe0001028, value: 0x00000000
Debug: 127 1625 target.c:1217 target_write_u32(): address: 0xe0001030, value: 0x00000000
Debug: 128 1640 target.c:1217 target_write_u32(): address: 0xe0001034, value: 0x00000000
Debug: 129 1640 target.c:1217 target_write_u32(): address: 0xe0001038, value: 0x00000000
Debug: 130 1640 target.c:1217 target_write_u32(): address: 0xe0001040, value: 0x00000000
Debug: 131 1640 target.c:1217 target_write_u32(): address: 0xe0001044, value: 0x00000000
Debug: 132 1640 target.c:1217 target_write_u32(): address: 0xe0001048, value: 0x00000000
Debug: 133 1640 target.c:1217 target_write_u32(): address: 0xe0001050, value: 0x00000000
Debug: 134 1656 target.c:1217 target_write_u32(): address: 0xe0001054, value: 0x00000000
Debug: 135 1656 target.c:1217 target_write_u32(): address: 0xe0001058, value: 0x00000000
Debug: 136 1656 cortex_m3.c:302 cortex_m3_debug_entry():
Debug: 137 1671 cortex_m3.c:110 cortex_m3_clear_halt(): NVIC_DFSR 0x0
Debug: 138 1671 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 0 value 0xee5fecb4
Debug: 139 1687 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 1 value 0xdfbffcfe
Debug: 140 1687 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 2 value 0x21a0b1ae
Debug: 141 1703 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 3 value 0xbb1f9923
Debug: 142 1703 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 4 value 0xfedff757
Debug: 143 1718 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 5 value 0x114d9ffc
Debug: 144 1734 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 6 value 0x25322b31
Debug: 145 1734 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 7 value 0x2a60dc61
Debug: 146 1750 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 8 value 0xcb97fffd
Debug: 147 1765 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 9 value 0xff9fff9e
Debug: 148 1765 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 10 value 0xe21676a4
Debug: 149 1765 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 11 value 0xe22a7718
Debug: 150 1781 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 12 value 0xfff3fdfe
Debug: 151 1781 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 13 value 0xffffffdc
Debug: 152 1796 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 14 value 0xfffffff9
Debug: 153 1796 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 15 value 0xfffffffe
Debug: 154 1812 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 16 value 0x1000003
Debug: 155 1828 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 17 value 0xffffffdc
Debug: 156 1828 cortex_m3.c:1124 cortex_m3_load_core_reg_u32(): load from core reg 18 value 0x3c610110
Debug: 157 1843 cortex_m3.c:1150 cortex_m3_load_core_reg_u32(): load from special reg 19 value 0x0
Debug: 158 1843 cortex_m3.c:1150 cortex_m3_load_core_reg_u32(): load from special reg 20 value 0x0
Debug: 159 1859 cortex_m3.c:1150 cortex_m3_load_core_reg_u32(): load from special reg 21 value 0x0
Debug: 160 1875 cortex_m3.c:1150 cortex_m3_load_core_reg_u32(): load from special reg 22 value 0x0
Debug: 161 1875 cortex_m3.c:287 cortex_m3_examine_exception_reason(): HardFault SHCSR 0x20000, SR 0x40000000, CFSR 0x1001, AR 0xffffffff
Debug: 162 1875 cortex_m3.c:362 cortex_m3_debug_entry(): entered debug state in core mode: Handler at PC 0xfffffffe, target->state: halted
Debug: 163 1875 target.c:723 target_call_event_callbacks(): target event 0
Debug: 164 1875 target.c:424 target_process_reset(): Polling target
Debug: 165 1890 ft2232.c:253 ft2232_speed(): 86 0a 00
And when I try to probe the flash typing “flash probe 0” in a telnet connection to port 4444, here is what I get :
Info: 166 36500 server.c:78 add_connection(): accepting 'telnet' connection from 0
Debug: 167 43156 command.c:425 command_run_line(): flash probe 0
Debug: 168 43171 target.c:1149 target_read_u32(): address: 0xe0042000, value: 0x20016410
Info: 169 43171 stm32x.c:621 stm32x_probe(): device id = 0x20016410
Debug: 170 43171 cortex_swjdp.c:208 swjdp_transaction_endcheck(): swjdp: CTRL/STAT error 0xf0000021
Error: 171 43171 cortex_swjdp.c:222 swjdp_transaction_endcheck(): SWJ-DP STICKY ERROR
Debug: 172 43171 cortex_swjdp.c:229 swjdp_transaction_endcheck(): swjdp: status 0xf0000001
Error: 173 43187 cortex_swjdp.c:236 swjdp_transaction_endcheck(): dcb_dhcsr 0x30003, nvic_shcsr 0x20000, nvic_cfsr 0x1001, nvic_bfar 0xe000edf8
Debug: 174 43187 target.c:1179 target_read_u16(): address: 0x1ffff7e0 failed
Warning: 175 43187 stm32x.c:633 stm32x_probe(): STM32 flash size failed, probe inaccurate - assuming 128k flash
Info: 176 43187 stm32x.c:645 stm32x_probe(): flash size = 128kbytes
What am I doing wrong ?