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

No success flashing STM8L001J3 #91

Open
TG9541 opened this issue Jan 14, 2018 · 2 comments
Open

No success flashing STM8L001J3 #91

TG9541 opened this issue Jan 14, 2018 · 2 comments

Comments

@TG9541
Copy link

TG9541 commented Jan 14, 2018

I tried flashing the STM8L001J3 with binary contained in vdudouyt/stm8flash
3e034d3 (master, Dec 13, 2017). Flashing the device doesn't work for unknown reasons. I tried using the "-d slow" option to no avail. Setting the option bits, however, works. Note that the device doesn't have a NRST pin.

Note:
I had a look at the code (which doesn't compile for me), and found that stm8flash doesn't cluster technical information about STM8 variants into family and density. It simply uses the marketing name, and leaves QA to the user (the list in README.md).

Also note that I published information, derived from the STM8CubeMX db/mcu folder, on hypothetical common silicon properties in the Wiki of my fork of this repository.

@TG9541
Copy link
Author

TG9541 commented Jan 14, 2018

I did some research:

  • AN2659 STM8 in-application programming (IAP) delegates information about flash programming to the STM8 Standard Peripheral Library
  • STM8FLASH uses block programming for Flash
  • STSW-STM8012 STM8L10x standard peripheral library, unlike the other STM8L and STM8S libraries, doesn't provide a block programming function
  • the FLASH_xx registers are defined in the STM8L10xx datasheet, and I couldn't find any information about differences between the STM8L10xx sub-family and the other STM8L and STM8S devices.

I added a log facility to my local copy of STM8FLASH, and made it write an interaction trace. It fails whenever I use stlink2_wait_until_transfer_completes(). In block mode it didn't write any data. However, a test with writing Flash data in byte mode wrote the first 4 bytes to my STM8L001J3 chip.

@icraftcrafts
Copy link

hi.i just tried the raw chip. it seems to flash when power and programmer power are present. its possibly to do with the delay that needs to be there with the circuit power before the programmer uses swim. this definitely works on stm8flash. ive created a win vm with cosmic ​and got an error in there that led me to try this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants