Tool/software:
The BQ25504 is neat device that i got running quite well, up to a couple of minor points i do not understand. Before we get to that my first question is if it can be that there is a small error in the functional block diagram presented on page 12 of the datasheet SLUSAH0G – OCTOBER 2011 – REVISED AUGUST 2023 (Revision G), which is the latest version afaik. Here is part of that diagram:

Observe that when internal switch A is closed VRDIV is connected OK_HYST (which seems okay for some measurement mode) but also to the opamp and compared with Vref. Although the latter could serve some function, it seems incorrect here, because it would render the measurement of OK_PROG impossible at the same time. However, the latter is needed in order to determine the value VBAT_OK_PROG, since that formula does not contain ROK3. So, i have the feeling the circuit should be something like this:

Here, if switch B is closed and A is open VBAT_OK_HYST can be determined and if both are closed, ROK3 is effectively shortened (see below), so that VBAT_OK_PROG can be measured.

When measuring the voltage over ROK3, this line of reasoning seems to be confirmed. With decreasing voltage VSTORE the voltage over ROK3 is zero, whereas is suddenly becomes positive after passing the VBAT_OK_PROG threshold. But the question remains, what is the role of switch B? So probably i am still missing something here.
Could you comment on my reasoning and the role of switch B?