implement stm32h5 series, erase, read and write#1492
implement stm32h5 series, erase, read and write#1492jameswalmsley wants to merge 1 commit intostlink-org:testingfrom
Conversation
2876aff to
99c70cd
Compare
|
Ok - I've cleaned up a little bit. And I found the OSX issue (it works reliably when using a USB-2.0 -> USB-C cable) - but if I use a usb-c cable plugged directly into the MacBook, then I get lots of libusb errors. Leaving the note here in the hope of helping people in the future. |
e2ec565 to
1899194
Compare
|
Won't flash my H562 STM32CubeProgrammer connect: |
1899194 to
113c89d
Compare
|
Thanks @lbthomsen for testing this out - I'll have a look to see if I can work out what's happening. and Please confirm the size of flash and SRAM on your MCU? |
| int32_t result; | ||
| uint32_t status = 0; | ||
|
|
||
| result = _stlink_usb_read_debug32(sl, STM32_REG_DHCSR, &status); |
There was a problem hiding this comment.
This difficult logic is'n needed. You cant fix _stlink_usb_read_debug32 function:
int32_t _stlink_usb_read_debug32(stlink_t *sl, uint32_t addr, uint32_t *data) {
if (sl->target_ap != 0) return _stlink_usb_read_mem32(sl, addr, data)
...
return (0);
}Debug32 calls do not support setting AP. Similarly _stlink_usb_write_debug32 needs to be fixed. This will significantly simplify the changes that adding H5.
There was a problem hiding this comment.
Thanks for the feedback - I'll update the PR and re-test
This patch gives a working stlink for the h5 series nucleo boards.
I'd like to get some early feedback - because I really don't know what I'm doing in this code-base -- and some direction on getting this into shape would be appreciated.
Hope it helps.