Other Parts Discussed in Thread: EV2400
Tool/software: TI C/C++ Compiler
Hi,
I use a microcontroller (arduino uno) for communicated with BQ20z95.
I would like read Device Name using read data flash, not with Standard SBS Commands. Because after i want change the device name and other data like SubClass 49 (BQ20Z95_DATA_FLASH_SUB_CLASS_CONFIGURATION) accessible only by data flash.
I following the datasheet instruction about how to reading data flash, but i have problems when i want reading the second page, the data are not correct because i don't have name of device and the other data contained in 2nd page.
I reading the 2nd page immediately after have reading the 1st page. But it's strange because when a reading only the 2nd page i have the same data for 2nd page that when i read the both.
Can you send me instruction with more detail for read write data flash ? Or code example in C ?
Read complete SBS Configuration Data subclass (SubclassID =48) into RAM:
· Write Subclass ID
– SMB Slave Address (0x16)
– SMB CMD 0x77 (BQ20Z95_DATA_FLASH_SUB_CLASS_ID) with 0x0030 (BQ20Z95_DATA_FLASH_SUB_CLASS_DATA) as data
· Read Subclass (2 blocks are needed as its over 32 bytes long)
– SMBSlave Address (0x16)
– SMB CMD 0x78 (BQ20Z95_DATA_FLASH_SUB_CLASS_PAGE_1) receiving 32 bytes of data
– SMB CMD 0x79 (BQ20Z95_DATA_FLASH_SUB_CLASS_PAGE_2) receiving 32 bytes of data
My reading program data:
09:58:19.822 -> BQ found
09:58:19.822 -> Unlock Gauge
09:58:19.875 -> Operation Status: 0xC441 => (Read with Standard SBS Commands)
09:58:20.823 -> Device Name: E013RK => (Read with Standard SBS Commands)
09:58:21.827 -> Manufacturer Name: EONEMOLI => (Read with Standard SBS Commands)
09:58:21.880 -> Voltage: 11320 => (Read with Standard SBS Commands)
09:58:21.880 -> Battery Mode: 0x1 => (Read with Standard SBS Commands)
09:58:21.927 -> Serial Number: 0x650 => (Read with Standard SBS Commands)
09:58:21.927 -> Battery Status: 1,0xC7 => (Read with Standard SBS Commands)
09:58:21.980 -> Safety Status: 0x0 => (Read with Standard SBS Commands)
09:58:22.930 -> Device Name: Page 1:0x20 0x62 0x2B81 0x4F31 0x50 0x5A6C 0x2178 0x4F45
09:58:22.983 -> Page 2:0x0 0xFFFFB4B4 0xFFFFB4B4 0xFFFFB4B4 0xFFFFB4B4 0xFFFFB4B4 0xFFFFB4B4 0xFFFFB4B4
09:58:23.084 -> Lock Gauge
09:58:23.131 -> Operation Status: 0xE441
Thanks.