Использую для написания кода Eclipse. Создал проект для stm32f0x (по умолчанию, мигалка) поправил заголовочный файл
// Port numbers: 0=A, 1=B, 2=C, 3=D, 4=E, 5=F, 6=G, ...
#define BLINK_PORT_NUMBER (1) // Порт B
#define BLINK_PIN_NUMBER (1) //пин 1 - 14 нога в TSSOP20 корпусе
#define BLINK_ACTIVE_LOW (0)
собираю заливаю командой
st-flash --reset write empty.bin 0x08000000
2016-02-25T16:18:59 INFO src/stlink-common.c: Loading device parameters....
2016-02-25T16:18:59 INFO src/stlink-common.c: Device connected is: F0 small device, id 0x10006444
2016-02-25T16:18:59 INFO src/stlink-common.c: SRAM size: 0x1000 bytes (4 KiB), Flash: 0x4000 bytes (16 KiB) in pages of 1024 bytes
2016-02-25T16:18:59 INFO src/stlink-common.c: Attempting to write 1600 (0x640) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08000400 erased
2016-02-25T16:18:59 INFO src/stlink-common.c: Finished erasing 2 pages of 1024 (0x400) bytes
2016-02-25T16:18:59 INFO src/stlink-common.c: Starting Flash write for VL/F0/F3 core id
2016-02-25T16:18:59 INFO src/stlink-common.c: Successfully loaded flash loader in sram
1/1 pages written
2016-02-25T16:18:59 INFO src/stlink-common.c: Starting verification of write complete
2016-02-25T16:18:59 INFO src/stlink-common.c: Flash written and verified! jolly good!
и тишина.
BOOT0 - low
Пробовал отключать и включать питание, все равно тишина.
Пробовал стереть перед заливкой
st-flash erase
2016-02-25T16:29:33 INFO src/stlink-common.c: Loading device parameters....
2016-02-25T16:29:33 INFO src/stlink-common.c: Device connected is: F0 small device, id 0x10006444
2016-02-25T16:29:33 INFO src/stlink-common.c: SRAM size: 0x1000 bytes (4 KiB), Flash: 0x4000 bytes (16 KiB) in pages of 1024 bytes
Mass erasing
Все равно тишина.
Запускаю
openocd -f interface/stlink-v2.cfg -f target/stm32f0x.cfg
Open On-Chip Debugger 0.9.0 (2015-09-02-10:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.214650
Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
отзывается
подключаюсь к нему телнетом
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> reg
===== arm v7m registers
(0) r0 (/32)
(1) r1 (/32)
(2) r2 (/32)
(3) r3 (/32)
(4) r4 (/32)
(5) r5 (/32)
(6) r6 (/32)
(7) r7 (/32)
(8) r8 (/32)
(9) r9 (/32)
(10) r10 (/32)
(11) r11 (/32)
(12) r12 (/32)
(13) sp (/32)
(14) lr (/32)
(15) pc (/32)
(16) xPSR (/32)
(17) msp (/32)
(18) psp (/32)
(19) primask (/1)
(20) basepri (/8)
(21) faultmask (/1)
(22) control (/2)
===== Cortex-M DWT registers
(23) dwt_ctrl (/32)
(24) dwt_cyccnt (/32)
(25) dwt_0_comp (/32)
(26) dwt_0_mask (/4)
(27) dwt_0_function (/32)
(28) dwt_1_comp (/32)
(29) dwt_1_mask (/4)
(30) dwt_1_function (/32)
> flash probe 0
device id = 0x10006444
flash size = 16kbytes
flash 'stm32f1x' found at 0x08000000
> halt
target state: halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0xfffffffe msp: 0x20002000
> flash probe 0
device id = 0x10006444
flash size = 16kbytes
flash 'stm32f1x' found at 0x08000000
> flash erase_check 0
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000000a msp: 0x20002000
successfully checked erase state
# 0: 0x00000000 (0x400 1kB) not erased
# 1: 0x00000400 (0x400 1kB) not erased
# 2: 0x00000800 (0x400 1kB) erased
# 3: 0x00000c00 (0x400 1kB) erased
# 4: 0x00001000 (0x400 1kB) erased
# 5: 0x00001400 (0x400 1kB) erased
# 6: 0x00001800 (0x400 1kB) erased
# 7: 0x00001c00 (0x400 1kB) erased
# 8: 0x00002000 (0x400 1kB) erased
# 9: 0x00002400 (0x400 1kB) erased
# 10: 0x00002800 (0x400 1kB) erased
# 11: 0x00002c00 (0x400 1kB) erased
# 12: 0x00003000 (0x400 1kB) erased
# 13: 0x00003400 (0x400 1kB) erased
# 14: 0x00003800 (0x400 1kB) erased
# 15: 0x00003c00 (0x400 1kB) erased
> flash info 0
#0 : stm32f1x at 0x08000000, size 0x00004000, buswidth 0, chipwidth 0
# 0: 0x00000000 (0x400 1kB) not protected
# 1: 0x00000400 (0x400 1kB) not protected
# 2: 0x00000800 (0x400 1kB) not protected
# 3: 0x00000c00 (0x400 1kB) not protected
# 4: 0x00001000 (0x400 1kB) not protected
# 5: 0x00001400 (0x400 1kB) not protected
# 6: 0x00001800 (0x400 1kB) not protected
# 7: 0x00001c00 (0x400 1kB) not protected
# 8: 0x00002000 (0x400 1kB) not protected
# 9: 0x00002400 (0x400 1kB) not protected
# 10: 0x00002800 (0x400 1kB) not protected
# 11: 0x00002c00 (0x400 1kB) not protected
# 12: 0x00003000 (0x400 1kB) not protected
# 13: 0x00003400 (0x400 1kB) not protected
# 14: 0x00003800 (0x400 1kB) not protected
# 15: 0x00003c00 (0x400 1kB) not protected
STM32F03x - Rev: 1.0
отзывается
Может кто сталкивался с подобной ситуацией?
Я так понимаю что железо работает правильно, не правильной код, или записан не так и не туда.
В какую сторону мне копать?
PS:До этого работал с stm32f103 все отлично работает.
код проекта
https://github.com/strelok1111/stm32f030_empty
OS - Linux