Skip to content

[STM32CubeProgrammer] "-e all" does not work for STM32G031J6 (Serial method) #82

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

Closed
olikraus opened this issue Feb 3, 2022 · 5 comments
Labels
invalid This doesn't seem right

Comments

@olikraus
Copy link

olikraus commented Feb 3, 2022

Not sure where I can address the issue with the "-e all" commandline option for STM32CubeProgrammer.
So I put it here:

The "-e all" mass erase option does not work with the STM32G031J6. The following error is generated by the commandline version (Linux, USART interface):

Chip ID: 0x466 
BootLoader protocol version: 3.1
Device name : STM32G03x/STM32G04x
Flash size  : 64 KBytes (default)
Device type : MCU
Revision ID : --  
Device CPU  : Cortex-M0+


Mass erase ... 

Error: Mass erase operation failed.

Note: The J6 device only has 32KB Flash ROM.

See also #81

@fpistm
Copy link
Member

fpistm commented Feb 4, 2022

Hi @olikraus
unfortunately, the script will not change this behavior. It only call the STM32Cube Programmer cli and options are valid as it properly call a mass erase when protocol is set to "1x".
Why the mass erase does not work is not link to the core nor the tools provided here. You can try with the STM32CubeProgrammer GUI to see if more info are available (probably flash protection issue) but honestly can't do anything here.
Same for the Flash size displayed, it it the Cube programmer which handle this.
Using STLink it displays 32kb while the UART BL displays 64k (default).
Probably the BL try a mass erase on 64kb in Serial that's why it failed. But it is handle by the STM32cube Programmer.

@fpistm fpistm closed this as completed Feb 4, 2022
@fpistm fpistm added the invalid This doesn't seem right label Feb 4, 2022
@fpistm
Copy link
Member

fpistm commented Feb 4, 2022

Duplicate of #81

@fpistm fpistm marked this as a duplicate of #81 Feb 4, 2022
@olikraus
Copy link
Author

olikraus commented Feb 4, 2022

GUI to see if more info are available (probably flash protection issue) but honestly can't do anything here.

I really like the integration of CubeProgrammer into Arduino IDE. It reduces the effort the Arduino users.

Using STLink it displays 32kb while the UART BL displays 64k (default).

Yes correct, this is another issue what I observed (and maybe also the root cause why the mass erase fails)

but honestly can't do anything here.

My hope was, that you could raise a bug request for STM32CubeProgrammer. I assume that you are part of ST and maybe you have access to the internal bug tracker for STM32CubeProgrammer. Or, if such a public place is available, where I can report issues with STM32CubeProgrammer I will also do so, if you tell me where to create such a bug request.

Duplicate of #81

Sort of. 81 was for the .sh script and 82 (this issue) is for cube programmer.

But I understand, this issue can not be solved within this git project.
Nevertheless, I think cubeprogrammer has some bugs related the STM32G0 device, but I do not know where to address this.

Please close this issue.

@olikraus
Copy link
Author

olikraus commented Feb 4, 2022

Nevertheless, let me create a small list of issues, we figured out for STM32CubeProgrammer related to the STM32G031J6 device

  1. "-e all" creates an error
  2. "-e [0 31] does NOT create an error (expected valid range should be 0..15 because one page has 2kb)
  3. Flash size is not displayed correctly

@fpistm
Copy link
Member

fpistm commented Feb 4, 2022

My hope was, that you could raise a bug request for STM32CubeProgrammer. I assume that you are part of ST and maybe you have access to the internal bug tracker for STM32CubeProgrammer. Or, if such a public place is available, where I can report issues with STM32CubeProgrammer I will also do so, if you tell me where to create such a bug request.

Right, this will be the case when the first issue you open will be finish to investigate :) I close it here because it does not rely on the core nor the tools provided here.
So of course we will probably open an internal bug tracker about those issues.

@fpistm fpistm changed the title [STM32CubeProgrammer] "-e all" does not work for STM32G031J6 [STM32CubeProgrammer] "-e all" does not work for STM32G031J6 (Serial method) Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants