Industries · Industrial, energy and test
For instrument and inverter firmware
ByteAsk reproduces the bug on the simulated test bench before it touches the fix, and cites IEEE 1547 and SunSpec Modbus by section.
I’ll run `context_verify` now to confirm the new bench tests reproduce FP-251 before applying the fix.TESTS FAILED: built test_frontpanel (0 s), ran 1 test(s) (0 s)0% tests passed, 1 tests failed out of 1tests/test_frontpanel.c:39: CHECK_EQ(volume_get(), 23) failed: 17 != 23tests/test_frontpanel.c:54: CHECK_EQ(freq_get(), 1000 + (i + 1) * 100) failed: 900 != 1100not built: 6 other test program(s); none of them uses the code you changedThe new test reproduced the reported result exactly: three clockwise clicks changed volume from 20 to 17. The fix is in place; I’ll use `context_verify` for rev C and `cpp_test_select` to run the bench, encoder, and key tests in the rev B build.PASS: built test_frontpanel, test_encoder_qei, test_knob (0 s), ran 3 test(s) (0 s)100% tests passed, 0 tests failed out of 3not built: 4 other test program(s); none of them uses the code you changeddiff --git a/drivers/encoder/encoder_qei.c b/drivers/encoder/encoder_qei.c- /* Reverse in hardware: inverting TI1 flips the count direction at no cost. */- hal_tim_encoder_init(cfg->tim, 0xFFFF, cfg->reverse);+ /* Keep raw timer counts: encoder_detents() applies cfg->reverse for both drivers. */+ hal_tim_encoder_init(cfg->tim, 0xFFFF, false);
Recorded ByteAsk session on front-panel firmware for a bench signal source: a knob that turned the volume down when turned clockwise.
Standards it can cite
Modbus · IEEE 1547 · SCPI
grid_ref: IEEE 1547 · 2030.5 · SunSpec
SunSpec Modbus IEEE 1547-2018 Profile Specification and Implementation Guide§2.10 Voltage Trip · pp.17–18
The table below contains the IEEE 1547-2018 required voltage trip adjustable settings, the
associated IEEE 1547.1 results reporting label, and the SunSpec Modbus point mapping.
IEEE Std 1547-2018 IEEE Std 1547.1-2020 RR SunSpec Modbus
UV2 Voltage UV2_TRIP_V-AS 707.MustTrip.Crv.Pt[2].V
UV2 Clearing Time UV2_TRIP_T-AS 707.MustTrip.Crv.Pt[2].Tms
UV1 Voltage UV1_TRIP_V-AS 707.MustTrip.Crv.Pt[4].V
UV1 Clearing Time UV1_TRIP_T-AS 707.MustTrip.Crv.Pt[4].Tms
OV2 Voltage OV2_TRIP_V-AS 708.MustTrip.Crv.Pt[2].V
OV2 Clearing Time OV2_TRIP_T-AS 708.MustTrip.Crv.Pt[2].TmsThe tools it runs for Industrial, energy and test
- CMake
- cppcheck
- clang-tidy
- ASan and UBSan
- gdb
- Git
Enterprise
See Enterprise Your code stays inside your walls
On-prem, air-gapped and bring-your-own-key deployments, with the controls your security team will ask for.
