Code Monkey home page Code Monkey logo

Comments (3)

0r10nV avatar 0r10nV commented on June 10, 2024 2

Yes, the actual image sizes accompanying TI's bqEVSW products (..TI/bqEVSW/Plugins/Device defaults/*.dfi) have mostly 1793 bytes in size, but we should take into account that slua379e covers TI native devices which mostly not use DF space beyond 0x700.
But when it come to another Vendors who opted to develop their own firmwares (like Sony, Sanyo or Dell) the actual used DF space could differ. For example Sanyo-based bq8030 Gas Gauges store Manufacture Date at 0x7B0 and Serial Number at 0x7B2 i.e. almost at the end of user-allowable offsets.

Like for me,

#define EEPROM_BLOCK_COUNT 64

looks correct because it represent the real size of Full DF of bq8030 family.

To fix verification issue we could correct the number of reserved bytes.
According to sluu225 (BootROM API v3.0) it's 32 bytes, but the real size is probably 64 (this value is used in BootROM routine DF_CheckSum() which returns integrity check value for 0x47C0-0x4000=0x7C0 (1984) bytes.

from smbusb.

karosium avatar karosium commented on June 10, 2024

Thanks, it's definitely a bug and the fix is probably how I originally wanted to implement it, but...

According to the code on page 3 here: http://www.ti.com/lit/an/slua379e/slua379e.pdf there are only 56 rows(/blocks) of dataflash in the bq20zXX/8030 family, which might mean that the issue is actually

#define EEPROM_BLOCK_COUNT 64

leading to 256bytes of garbage at the end of the images. This would explain why verification would've been failing for me and evidently I ended up disabling it by mistake while trying to figure out why.

I'll try to look into it a little bit more over the weekend and confirm.

from smbusb.

karosium avatar karosium commented on June 10, 2024

Ah, makes sense! Thanks for the clarification, I wasn't sure if I added the reserved bytes based on documentation or assumption. In that case the proposed fix looks good to me, feel free to send a PR.

from smbusb.

Related Issues (20)

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.