Quantcast
Channel: Power management forum - Recent Threads
Viewing all articles
Browse latest Browse all 35901

BQ35100: Access the unsealed mode

$
0
0

Part Number: BQ35100

Hi,

I made a state machine for the different acces modes, but for some reason I'm not able to write to the control status.
Returning the control status, always gives the value 2080, no matter what I write to it.

Writing to the dataFlash works perfectly, I'm able to change config A for example.


void setSecurityMode(uint8_t setState){ uint8_t data[2]= {0}; enum states{ FULL_ACCESS, UNSEALED, SEALED, }; enum states state = setState; switch(state){ case FULL_ACCESS: data[1] = 0xFF; data[0] = 0xFF; DelayMs(300); I2cWriteBuffer(&I2c, 0xAA, 0x3e, data ,2); data[1] = 0xFF; data[0] = 0xFF; DelayMs(300); I2cWriteBuffer(&I2c, 0xAA, 0x3e, data ,2); DelayMs(300); break; case UNSEALED: data[0] = 0x04; data[1] = 0x14; DelayMs(300); I2cWriteBuffer(&I2c, 0xAA, 0x3e, data ,2); data[0] = 0x36; data[1] = 0x72; DelayMs(300); I2cWriteBuffer(&I2c, 0xAA, 0x3e, data ,2); break; case SEALED: data[0] = 0x20; // First byte of SEALED sub-command (0x20) data[1] = 0x00; // Second byte of SEALED sub-command (0x00) (register address will auto-increment) I2cWriteBuffer(&I2c, 0xAA, 0x3E, data ,2); DelayMs(100); break; } }

Please help me with this problem,

Jorg


Viewing all articles
Browse latest Browse all 35901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>