On Sun, May 22, 2016 at 5:16 PM, Uwe Bonnes <
[email protected]> wrote:
> Hello,
>
> starting openocd after a hardware reset for the first time, the sequence
>
> retval = target_read_u32(target, DBGMCU_IDCODE, &device_id);
> retval = target_read_u16(target, FLASH_SIZE_REG, &flash_size_in_kb);
>
> only succeeds for DBGMCU_IDCODE (0xE0042000), while the read for
> FLASH_SIZE_REG (0x1FFF75E0) fails. This happens with STLINK and
> Segger STLINK:
>
> jaylink: Failed to retrieve serial number: LIBUSB_ERROR_IO.
> Info : No device selected, using first device.
> Info : J-Link STLink V21 compiled Apr 15 2016 10:47:22
> Info : Hardware version: 1.00
> Info : VTarget = 3.300 V
> Info : clock speed 2000 kHz
> Info : SWD DPIDR 0x2ba01477
> Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
> Info : accepting 'gdb' connection on tcp/3333
> Info : device id = 0x10006421
> Info : flash size = 8192kbytes
>
>
Could be because you have the chip in reset (connect_assert_srst for
example). I've seen on some variants that the flash is inaccessible under
reset, don't remember which family it was, perhaps L15x. I don't remember
seeing it on the F4.
Also the bogus value might be the ST-Link giving you garbage instead of
failure. Have you tried with a real JTAG/SWD adapter?
/Andreas
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel