Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple read/write support for STM32WB55 chips. #786

Merged
merged 2 commits into from
Mar 31, 2019

Conversation

WRansohoff
Copy link
Contributor

This adds support for STM32WB55 chips - I've only tried a simple 'blink' program on the 'Nucleo-68' board, but it seems to work.

The logic and register offsets look about the same as the STM32G0 series, though - I might check if it would be easy to merge that logic, or maybe adapt it to the other chips' abstractions like set_flash_cr_pg(...). Would that be better?

@xor-gate
Copy link
Member

Looks good, we should prevent long functions with conditional checks switching on chip type. Better create functions per chip type eg STM32W and call that function.

@WRansohoff
Copy link
Contributor Author

Makes sense; I might have time this weekend if you don't mind leaving this open.

@xor-gate
Copy link
Member

xor-gate commented Mar 27, 2019 via email

@WRansohoff
Copy link
Contributor Author

Okay, hopefully this is a little bit cleaner. The G0 and WB series seem to have similar register offsets (like, FLASH_CR is offset by 0x14 instead of the usual 0x10), so I used the same logic for both and updated it to use the existing Flash register methods.

@xor-gate
Copy link
Member

Great, thanks for the effort!

@xor-gate xor-gate merged commit 4ff515e into stlink-org:master Mar 31, 2019
@yaqwsx
Copy link

yaqwsx commented Apr 25, 2019

This PR breaks flashing programs on STM32G071 (which I described in #759). When I revert stlink to c6836b4, the flashing works again.

I am not well familiar with the flashing procedures nor the stlink codebase. Could you, @WRansohoff, look at it, please?

@WRansohoff
Copy link
Contributor Author

Well, it's certainly possible - I did try to unify the G0 and WB code since they looked mostly identical and it made the code easier to read.

I have a ~126KB binary to test with, and it shows the same thing, failing to verify after 4096 bytes. I guess that's what happens when you assume, huh?

Sorry, but thanks for bringing this up. I'll take a look, it's probably something dumb.

@WRansohoff
Copy link
Contributor Author

I think that #797 should fix this issue, assuming I didn't mess up the Github pull request interface.

@Nightwalker-87 Nightwalker-87 removed this from the General milestone Feb 21, 2020
@Nightwalker-87 Nightwalker-87 self-assigned this Feb 21, 2020
@Nightwalker-87 Nightwalker-87 added this to the v1.6.0 milestone Feb 21, 2020
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants