Git Product home page Git Product logo

stc15bootisp's People

Contributors

mightymos avatar

Watchers

 avatar

stc15bootisp's Issues

No ability to enable isp flash

Hi Jonathan,

I've run into the same problems as you, and it took me some time to understand why.
The explanation was on page 277 of the STC15 family documentation, under section 3.1 (Program Memory).
It explains there are 3 sections in the chip's flash:

  • AP: where the application program resides
  • IAP: EEPROM emulation for persistent data storage
  • ISP: reserved space for a custom bootloader

As IAP and ISP are often used together ("IAP/ISP") throughout the documentation, I've confused them.

Section 3.1 says that in order to use the ISP area, the "ISP data flash" must be enabled, but I couldn't find how to enable it.

Section 2.2.8 (Warm Boot and Cold Boot Reset) on page 242 explains that failure to find valid ISP code causes an automatic software reboot to AP.
This explains why nothing happened, the program was caught in an infinite reset loop.

I've also tried to jump directly from the AP to the EEPROM start address with an inline LJMP instruction but it didn't work either.
The portion reserved to the EEPROM is probably flagged as non-executable, so we're in the "Reset caused by illegal use of program address" case of the table in section 2.2.8.

Incidentally, while I was examining STCGAL's debug logs, I found the size written always exceeds the number of 512-byte flash pages by 64 bytes.
These are used by the MCU options and are always written after the code + EEPROM content.
This is why options can't be changed independently from the code.

What a waste to have such a large EEPROM space and not enough Flash storage for the software to use it! :(
There's just one thing you can do with the EEPROM space, it's storing constants (e.g. strings, look-up tables).
This has been found to work and is explained here: zerog2k/stc_diyclock#6 (comment)
Mind the last 7 bytes of the AP area are used to store a chip UID, so you have to tell it to SDCC.

Vincent Defert

2nd Flash impossible.

Hello,

I have flash the version 0.3.3 with success. I am trying to flash 0.3.5 ( or any version now) and I am blocked on

Waiting for MCU, please cycle power:

I remove GND or VCC, but nothing appears, there is no data on serial port 1200b.
Any other way to enter flash mode ?
Pin are connected correctly and device stil working great. It works on a stock one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.