- **status**: new --> closed


---

** [tickets:#259] stlink-3 fail to read 1 byte alignment RAM**

**Status:** closed
**Milestone:** 0.9.0
**Labels:** stlink 
**Created:** Mon Nov 25, 2019 01:44 PM UTC by Pawel
**Last Updated:** Tue Jan 28, 2020 09:49 AM UTC
**Owner:** nobody


Hi all,

I have a problem with reading from RAM whet I set aligment to 1 byte.  Strange 
is that reading in 4-bytes aligment is OK.

My setup is:

Open On-Chip Debugger 0.10.0+dev-00957-g9de7d9c8 (2019-11-15-13:16)
stlink-3
stm32g431

I'm using openocd as lib.

~~~
// this is ok
res = api->read_mem(handle, RAM_START, 4, ramKb * 0x100, buf);
// here we fail (-7)
res = api->read_mem(handle, RAM_START, 1, ramKb * 0x100, buf);
~~~

and log:
Info : 10 16 stlink_usb.c:1040 stlink_usb_version(): STLINK V3J4M2 (API v3) 
VID:PID 0483:374E
Debug: 11 17 stlink_usb.c:1264 stlink_usb_init_mode(): MODE: 0x01
Info : 12 19 stlink_usb.c:1072 stlink_usb_check_voltage(): Target voltage: 
3.279681
Debug: 13 19 stlink_usb.c:1319 stlink_usb_init_mode(): MODE: 0x01
Debug: 14 21 stlink_usb.c:2539 stlink_dump_speed_map(): Supported clock speeds 
are:
Debug: 15 21 stlink_usb.c:2542 stlink_dump_speed_map(): 24000 kHz
Debug: 16 21 stlink_usb.c:2542 stlink_dump_speed_map(): 8000 kHz
Debug: 17 21 stlink_usb.c:2542 stlink_dump_speed_map(): 3300 kHz
Debug: 18 21 stlink_usb.c:2542 stlink_dump_speed_map(): 1000 kHz
Debug: 19 21 stlink_usb.c:2542 stlink_dump_speed_map(): 200 kHz
Debug: 20 21 stlink_usb.c:2542 stlink_dump_speed_map(): 50 kHz
Debug: 21 21 stlink_usb.c:2542 stlink_dump_speed_map(): 5 kHz
Debug: 22 26 stlink_usb.c:1378 stlink_usb_init_mode(): MODE: 0x02
Debug: 23 28 stlink_usb.c:2874 stlink_usb_open(): Using TAR autoincrement: 4096
Info : 24 28 main.c:209 main(): target have 32Kb ram
Debug: 25 526269 stlink_usb.c:500 jtag_libusb_bulk_transfer_n(): ERROR, 
transfer 1 failed, error -7

I am using master branch openocd:

Open On-Chip Debugger 0.10.0+dev-00957-g9de7d9c8 (2019-11-15-13:16)




---

Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to