Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OV/UV_TRIP config kind of return probaly off by 1000 * (set im V return in mV) #58

Open
kfessel opened this issue Feb 28, 2024 · 0 comments
Labels

Comments

@kfessel
Copy link

kfessel commented Feb 28, 2024

sorry very short

ic_conf->cell_uv_limit =
(1U << 12 | uv_trip << 4) * dev_data->adc_gain / 1000 + dev_data->adc_offset;

of by a factor of 1000 (adc_gain is in µV/LSB)

ic_conf->cell_uv_limit =
    ((0x1000UL | (uv_trip << 4)) * dev_data->adc_gain / 1000.0 + dev_data->adc_offset) / 1000.0;

ic_conf->cell_ov_limit =
(1U << 13 | ov_trip << 4) * dev_data->adc_gain / 1000 + dev_data->adc_offset;

of by a factor of 1000 (adc_gain is in µV/LSB)
and
for ti manual SLUSBK2I – page 22 OV trip level is mapped to “10-XXXX-XXXX–1000”.

therefor the (1U << 13 | ov_trip << 4) should probaly be (1U << 13 | ov_trip << 4|0x8) to match the effective value

ic_conf->cell_ov_limit = 
   ((0x2008UL | (ov_trip << 4)) * dev_data->adc_gain / 1000.0 + dev_data->adc_offset) / 1000.0;
@kfessel kfessel changed the title OV/UV_TRIP config kind of return probaly of by 1000 OV/UV_TRIP config kind of return probaly off by 1000 * (set im V return in mV) Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants