Other Parts Discussed in Thread: BQSTUDIO, EV2400, ,
Tool/software:
int16_t read_bq40_da_config(AkkuName akku) { // Read DA Config (MAC address 0x495D) // 1. Send ManufacturerAccess() command with 0x495D // 2. Read response from 0x23 (ManufacturerData) uint8_t lsb_addr = 0x5D; uint8_t msb_addr = 0x49; uint8_t status; TWI_start(akku); status = TWI_write(akku, (0x0B << 1) | 0); // SLA+W if (status != 0x18) { uart_transmit_string("DAConfig: No ACK Addr\n"); TWI_stop(akku); return 0xFFFF; } status = TWI_write(akku, 0x00); // ManufacturerAccess() if (status != 0x28) { uart_transmit_string("DAConfig: Write error CMD\n"); TWI_stop(akku); return 0xFFFF; } status = TWI_write(akku, lsb_addr); // LSB of 0x495D if (status != 0x28) { uart_transmit_string("DAConfig: Write error LSB\n"); TWI_stop(akku); return 0xFFFF; } status = TWI_write(akku, msb_addr); // MSB of 0x495D if (status != 0x28) { uart_transmit_string("DAConfig: Write error MSB\n"); TWI_stop(akku); return 0xFFFF; } TWI_stop(akku); _delay_ms(3); // Allow time for BQ to process TWI_start(akku); status = TWI_write(akku, (0x0B << 1) | 0); // SLA+W if (status != 0x18) { uart_transmit_string("DAConfig: No ACK on Read Addr\n"); TWI_stop(akku); return 0xFFFF; } status = TWI_write(akku, 0x23); // ManufacturerData() if (status != 0x28) { uart_transmit_string("DAConfig: Write error Read CMD\n"); TWI_stop(akku); return 0xFFFF; } TWI_start(akku); status = TWI_write(akku, (0x0B << 1) | 1); // SLA+R if (status != 0x40) { uart_transmit_string("DAConfig: No ACK Addr Read Bit\n"); TWI_stop(akku); return 0xFFFF; } uint8_t lsb_data = TWI_read_ack(akku); uint8_t msb_data = TWI_read_nack(akku); // optional, unused TWI_stop(akku); return lsb_data; // Only the lower byte is meaningful //DA Config: 0x0004 → binary: 0000 0100 //Bit 2 (NR) = 1 → The PRES functionality is disabled }
Dear Texas Instruments Support Team,
we are currently working with the BQ40Z50-R1 and would like to clarify the expected behavior of the PRES pin.
We intent to activate BQ by pulling PRESS to GND and to deactivate by disconnecting it from GND. But against our expectation, PRESS seems to be low by default.
This leads to the question: Is there any internal pull-up on the PRES pin that we might be unaware of?
To investigate this further, we read the DA Config register (0x495D) using the ManufacturerAccess() command and received the following result: DA Config: 0x0004..this indicates:
- Bit 2 (NR) = 1 → The PRES functionality is disabled
Our understanding from the Technical Reference Manual is that:
“NR = 1” disables PRES-based detection, and the device ignores the PRES input.
We would like to confirm:
- Is our interpretation of Bit 2 in DA Config (NR) correct?
- Is there an internal pull-up or default low state on PRES when unconnected?
- Would setting NR = 0 (via DataFlash) be sufficient to enable PRES-based detection?
Please note that we communicate with the BQ40Z50-R1 via I²C using an ATmega328PB microcontroller.
We are not using TI tools like EV2400 or BQStudio, so we rely entirely on low-level register access via SMBus/I²C
The C function we use to read the DA Config register is attached to this email for reference. If there is anything we might be misinterpreting or doing incorrectly in our read process, we would greatly appreciate your feedback.
We also plan to transition from the BQ40Z50-R1 to the BQ40Z50-R2 in the near future.
- Are there any fundamental changes in layout or command structure in the R2 version, that we have you take care of?
- Do you have any practical software migration tips, best practices or edge cases that might not be directly obvious from the datasheet?
Thank you in advance for your support!
Best regards, Markus Klingspiegel