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

Battery voltage reading nonfunctional #116

Open
jmadden173 opened this issue Jul 19, 2024 · 1 comment
Open

Battery voltage reading nonfunctional #116

jmadden173 opened this issue Jul 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed stm32 Issues relating to the STM32 MCU

Comments

@jmadden173
Copy link
Contributor

jmadden173 commented Jul 19, 2024

Describe the Bug
The battery test (test_battery.c) hangs.

To Reproduce
Steps to reproduce the behavior:

  1. pio test -e tests -f test_battery
  2. Observe that the code hangs even after trying to reset
...
[stm32wlx.cpu0] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08003b8c msp: 0x20008000
** Programming Started **
Warn : Adding extra erase range, 0x08009ea0 .. 0x08009fff
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked
Testing...
If you don't see any output for the first 10 secs, please reset board (press reset button)

Expected Behavior
The test code should pass. When running the example code it appears to be reading two separate values. The code is fairly old and I believe that there is some hardware conflict between the LoRa and battery code. When trying to add SysApp_Init to start the clock and RTC that's used for HAL_Delay the code returns error. The way to read the values may have changed after playing around with the LoRa firmware.

Screenshots

Example output from example_battery. Should read a constant voltage

Battery Voltage: 8295 mV
Battery Voltage: 3947 mV
Battery Voltage: 2418 mV
Battery Voltage: 8298 mV

Environment

Linux spruce 6.8.2-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:35 +0000 x86_64 GNU/Linux
PlatformIO Core, version 6.1.7
Used ST-Link V3 MINIE

Done via remote development

Additional Context
Battery tests for remote development are currently disabled and should be enabled in the stm32.yaml workflow once fixed.

@jmadden173 jmadden173 added bug Something isn't working help wanted Extra attention is needed stm32 Issues relating to the STM32 MCU labels Jul 19, 2024
jmadden173 added a commit that referenced this issue Jul 19, 2024
Kshitijpatil16 pushed a commit to Kshitijpatil16/soil-power-sensor-firmware that referenced this issue Jul 24, 2024
@jmadden173
Copy link
Contributor Author

Wait until new battery circuity is implemented, see issue in hardware repo for progress: jlab-sensing/ENTS-node-hardware#55

After we will evaluate if this is still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed stm32 Issues relating to the STM32 MCU
Projects
None yet
Development

No branches or pull requests

3 participants