"Dav.p" <
dav...@tiscali.it> ha scritto nel messaggio
news:Vye0r.137448$GZ3....@tornado.fastwebnet.it...
> Dimmi se nella finestra del tasto Direct compare un bottone per reset
> dedicato al tuo
> chip BQ2040,
purtroppo no.
> se non c'e' clicca su un'altro della serie BQ e dimmi com'e' composto, io
> non lo posso vedere al momento.
Ti mando 2 schermate esemplificative:
http://imageshack.us/photo/my-images/215/42676209.jpg/
http://imageshack.us/photo/my-images/690/39389783.jpg/
Da quanto ho capito il problema è evidente in battery status che dà 2080 al
posto di 0080 (primo link).Quel 20 sono tutti quei bit che fanno
interrompere la ricarica delle batterie.
Cambiarli a mano purtroppo non serve a nulla (i dati rossi possono essere
riscritti con l'opzione write), dato che il chip poi va ad aggiornarsi con
quelli memorizzati nell'eeprom.
E proprio nell'eeprom il flag chiamato Function5 invece di B013 dovrebbe
essere 000c (così si resettano tutti i flags relativi agli errori del
precedente pacco batteria).
>Il tuo va resettato con questa sequenza come dice il
> suo manuale:
>
> reset sequence is the following: (1) write MaxError
> (0x0c) to 0x0000; (2) write the reset register (0x64) to
> 0x8009. A software reset can only be performed if the
> bq2040 is in an unlocked state as defined by the value in
> location 0x3d of the EEPROM (EE 0x3d) on power-up.
>
Da quanto si legge inoltre nel pdf "U-513 Using the bq2040"
SMBus Write-through to EEPROM
The SMBus write through function writes two bytes at a time. The correct
data word to be changed in the EEPROM may be determined from the E2 Map in
the reference section. To modify an EEPROM location from an SMBus command,
the WRALL bit must be set and the following sequence must be executed: 1.
Write the new information to be updated into the appropriate RAM location
using a normal SMB write command.
2. Execute a SMB write command to address 0x3c with the EEPROM location to
modify as the LSB data and the access key 0xb3 as the MSB data written with
CMD (0x3c). The EEPROM location
should always be an even address. A full 16-bit word consisting of both the
LSB byte in the even address and MSB byte in the next higher address are
written at the same time into the EEPROM.
The RAM address is not needed by the processor, as the map relating the two
sets of addresses is internal to the processor. The write operation occurs
within 0.5 seconds. The processor clears the 0xb3
access key from the msb of CMD (0x3c) when the operation is completed.
3. Confirmation of a successful EEPROM write is only possible by checking
the RAM locations initialized from the EEPROM after a full device reset. The
calibration factors in the EEPROM cannot be read
directly from the SMBus.
WRALL: The WRALL bit controls read and write access to a number of register
locations. CMD (0x3c) is read only unless WRALL is set, thus preventing an
EEPROM write-through. CMD (0x64) is not accessible unless WRALL is set,
preventing a software reset command. WRALL comes up set if EEPROM location
0x3d (BUSYFLG) has bit b3 = 1.
RESET: A software reset reinitializes all register values from the EEPROM.
It is the only way to verify that EEPROM values have indeed been updated. A
software reset is performed by the following sequence:
1. Check the value of MaxError (0x0c). If this value is 0x0002 (2%), it must
be first written to any different value.
2. Write 0x8009 into CMD (0x64).
3. Confirmation of a successful reset may be accomplished by verifying that
MaxError (0x0c) is now 0x0064 (100%) and that Temperature (0x08) is 0x0b72
(293.0oK). Temperature is updated to the
actual reading 20 seconds after the reset.
Da quanto capisco questo tipo di reset non fa altro che riprendere i dati di
default dall'eeprom, ma è proprio l'eeprom da resettare.
Ho 2 problemi: lo 0c maxerror è solo read se non si modifica una locazione
di memoria dell'eeprom che non riesco a raggiungere.
Il secondo è relativo a sti flags dell'eeprom. Anche in questo caso non
riesco a modificarli
con le istruzioni 2e e 2f, secondo quanto si dice qui:
MFLAG Master mode flag register (0x2e) lsb 0x5c
BUSYFLG Access protect register msb 0x5d
FLGS1 FLAGS1 register (0x2f) lsb 0x5e
FLGS2 FLAGS2 register msb 0x5f
Per modificare 'sti flags:
MFLAG Master mode flags initial value (Program to 0) (0x2e) lsb 0x3c
BUSYFLG Access protect (Program to 0xb0 for pack access protect, 0xb8 for
unprotected pack access) (0x2e) msb 0x3d
> se il comando di reset non va a buon fine e il codice
> di ritorno da errore
Non dà errore, anzi:
http://imageshack.us/photo/my-images/684/74542780.jpg/
Ma come puoi vedere, la modifica dei registri non sortisce effetto.
> vuol dire che la fabbrica della batteria ha settato la eprom per impedire
> una serie di comandi via smbus e il risultato e' che se vuoi resettare
> devi ampliare (!!!) la scheda
> con le modifiche pubblicate sempre negli help dei programmi, dissaldare la
> eprom e montarla
> (credo saldarla, nel caso di smd) sull'interfaccia, modificare il suddetto
> blocco e risaldarla oppure
> riscriverla tutta con le funz. dei programmi (se lo consentono, non ho
> capito).
>
Viva Maria.
Dissaldare l'eeprom mi sembra una cosa improba, al massimo potrei (ma non so
se è lo stesso) togliere l'alimentazione delle batterie alla scheda
elettronica e connettere l'interfaccia direttamente ai pin dell'eeprom
ancora saldata sulla pista.
Chissà.
Grazie