Skip to content

Commit

Permalink
lib: st25r3911b: Correction of errors in voltage calculation
Browse files Browse the repository at this point in the history
In official documentation on st 25r3911 when we measure voltage, one LSB represents 23.438 mV.
When calculating, we multiply the fractional part by a three-digit number. When restoring, we divide it by 100, not by 1000. This is an error.
  • Loading branch information
Andrew55529 committed Jan 23, 2025
1 parent 38f72b8 commit 1760112
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/st25r3911b/st25r3911b_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LOG_MODULE_DECLARE(st25r3911b);
#define POWER_SUPP_5V_STEP 120
#define POWER_SUPP_MEAS_INTEGER 23
#define POWER_SUPP_MEAS_FRACTION 438
#define POWER_SUPP_MEAS_FRACTION_DIVISOR 100
#define POWER_SUPP_MEAS_FRACTION_DIVISOR 1000
#define REGULATOR_INIT_REG_VALUE 5

#define FIELD_THRESHOLD_TRG_DEFAULT 0x30
Expand Down

0 comments on commit 1760112

Please sign in to comment.