Tool/software:
Hello,
I'm trying to configure BQ27220 with CC Delta value.
Algorithm is following:
1. Put BQ27220 to config update mode according to 6.1 Data Memory Parameter Update Example from BQ27220 Technical Reference Manual document
- unseal device
- enter full access mode
- enter config update mode
- confirm config update mode - OperationStatus() register bit 2 is set
2. Write CC Delta value - 0x488AA522
3. Read CC Delta value - 0x530aa522
4. Exit config update mode
- exit config update mode
- confirm exiting config update mode - OperationStatus() register bit 2 is clear
- seal device
My question is following - why there is different value in CC Delta? All other calibration values are correct.
Thanks,
Mykhaylo
Hello,
Can you share with me exactly what you are sending to the gauge when you are trying to write this to the gauge? It is likely that you are not correctly writing the length or checksum bytes to the gauge.
Regards,
Jonny.
Hey Jonny,
Thanks for your response. Please find complete script below:
1. Unsealing
Write 0 14
Write 1 4
Write 0 72
Write 1 36
Write 0 FF
Write 1 FF
Write 0 FF
Write 1 FF
Write 0 90
Write 1 0
Read 3B 4
2. Reading current CC Delta value
Write 3E 88
Write 3F 91
Read 40 93 0A A5 22
3. Writing new CC Delta value
Write 3E 88 91 48 8A A5 22
Write 60 4D 8 (checksum)
4. Read updated CC Delta value
Write 3E 88
Write 3F 91
Read 40 93 0A A5 22
5. Sealing
Write 0 92
Write 1 0
Write 0 91
Write 1 0
Read 3B 0
Write 0 30
Write 1 0
As you can see CC Delta wasn't updated after writing.
What am I doing wrong?
Mykhaylo
Hello,
It looks like you are not also sending the "ENTER_CAL" command. Please send the CAL_TOGGLE command to toggle OperationStatus()[CALMD] bit and also send the ENTER_CAL command to enter CALIBRATION mode.
Regards,
Jonny.
Jonny,
Thanks for prompt response.
What should be procedure for calibration mode? Should I call CAL_TOGGLE and ENTER_CAL right after unsealing? Should update config mode be entered? How can I be sure calibration mode is set?
Also, after I read/write CC Delta should I exit calibration mode before sealing?
Please suggest,
Mykhaylo
Hello,
You should unseal and full access -> CAL_TOGGLE -> ENTER_CAL.
You should send the EXIT_CAL command after sealing.
Regards,
Jonny.
Hey Jonny,
I've tried to add entering calibration mode but still no luck. Please check logs below
1. Unsealing
Write 0 14
Write 1 4
Write 0 72
Write 1 36
Write 0 FF
Write 1 FF
Write 0 FF
Write 1 FF
Write 0 90
Write 1 0
Read 3B 4
2. Set calibration mode
Write 0 2D
Write 1 0
Write 0 81
Write 1 0
3. Reading current CC Delta value
Write 3E 88
Write 3F 91
Read 40 93 0A A5 22
4. Writing new CC Delta value
Write 3E 88 91 48 8A A5 22
Write 60 4D 8 (checksum)
5. Read updated CC Delta value
Write 3E 88
Write 3F 91
Read 40 93 0A A5 22
5. Exit calibration mode
Write 0 80
Write 1 0
6. Sealing
Write 0 92
Write 1 0
Write 0 91
Write 1 0
Read 3B 0
Write 0 30
Write 1 0
What can be wrong here?
Thanks Jonny.
I'll try and let you know. Is there somewhere described float to hex conversion procedure for TI modules?
BR,
Mykhaylo
One more comment from my side. I think I've found how to convert float to hex, but that doesn't work either. There is a sentence in the manual - Use calibration routines to set this value. What are calibration routines? Where can I find an example?
Sorry still waiting for EVB to check with bqStudio
BR,
Mykhaylo
Hello,
We do not have a direct conversion equation to go from hex to float and vice-versa that I can provide here. You can calibrate the gauge by using the "Calibration" tab in BQStudio.
Regards,
Jonny.