Commit Graph

59 Commits

Author SHA1 Message Date
mutatrum
1cf656b411 Several refactors and cleanups (#1102)
- Extract BM##_set_job_difficulty_mask into a single function
- Set self_test difficulty before ASIC_init to eliminate ASIC_set_job_difficulty_mask
- Fixed some capitalisations of GLOBAL_STATE and some others
- Thermal.c: pass DEVICE_CONFIG by pointer instead of by value
2025-07-05 20:58:58 -04:00
0xf0xx0
c427d281e5 update api examples in README, remove dangling swarm OPTIONS endpoint (#1055) 2025-06-21 16:07:54 +02:00
mutatrum
d280f27ec4 Move frequency NVS read to power_management_task (#978)
This removes the last nvs read from `main.c`. Also removed unused `frequency_multiplier` field.
2025-06-11 23:11:00 +02:00
WantClue
51bd568839 Pid improvements (#947)
* feat: startup sequence for pid

* feat: improve pid rampup and hold period
2025-05-25 14:27:55 +02:00
mutatrum
0aa8c359fb Device model cleanup (#857)
* Add mock-up of device name and model on logo screen

* Remove nvs_get_wifi_credits

* Proof of concept for code review

* Fix merge

* Refactored vcore.c

* Log simplification

* Fix missed field rename

* Refactor self-test

* Refactor power.c

* Move Power_disable into VCORE_set_voltage

* Restore ASIC log line

* Clean up self-test.c

* Remove unused constants

* Ultra uses EMC2101 internal temperature sensor

* Simplify thermal configuration

* Set power_offset to 10W for GT (#867)

* Hex is BM1366

* Add board_version 600

* Use boardVersion from config in http response

* Fix GammaTurbo EMC2103 init

* Add Max 0.11 and Ultra 2.2 board versions

* Flip 0.11 and 2.2

* Merge branch 'dev-latest' into HEAD

* Move frequency and voltage options and defaults to device_config.h

* Fix voltage_options loop

* Fix missing frequency and voltage options for BM1368

* Add swarm colors

* Add new fields to openapi.yaml

* Fix asic_job_frequency for Max

* Fix merge
2025-05-15 22:51:21 +02:00
WantClue
0e035172fe hotfix fan controller, increase minimum and add ap mode fan speed (#896) 2025-05-07 10:57:42 +02:00
WantClue
74575bb9c1 fix: pid finetune, adjusting the settings (#852) 2025-04-17 18:47:36 +02:00
WantClue
e78b6954c9 PID Fan Control (#800)
* pid init

* feat: PID controller

* fix: adjust PID setPoint temp

* changed TPS546_get_iout() to read the combined current for both phases (#796)

* fix: include

* fix: don't collect hashrate while in power_fault (#804)

* fix: raw ints to enums

* feat: add ui target temp

* fix: PID reduce min fan speed to 15

* fix: add openapi temptarget

* fix: adjust default temp target

* fix: adjust setPoint on the fly

* add comments

* fix: go back to 60 and set var instead of hard code

---------

Co-authored-by: skot <140785+skot@users.noreply.github.com>
2025-04-07 23:06:20 +02:00
skot
9c6910966e Create TPS546 VCORE alerts (#780)
* add ISR for SMB_ALRT and checking in systemtask

* change order of gpio ISR init

* switch back tp TPS546 status polling

* added some comments arbout the structure of the 3 fault responses

* feat: add TPS alerts to UI

* change Gamma VIN_OV_FAULT_LIMIT from 5.5V to 6.5V

* changed the power fault banner to use the SYSTEM_MODULE.power_fault flag. Found the right TPS546 register so that a soft reset clears a power fault.

* clean up fault alert wording

* remove the PMBUS_ALERT interrupt -- that never worked.

* cleanup https_server.c includes

* remove unused TPS546 functions

* handle setting the power_fault flag in TPS546.c. only print the error messages once.

* make TPS542 faults debug more consistent

* added more detail to TPS546_parse_status()

---------

Co-authored-by: WantClue <Lars_Naether@hotmail.de>
2025-03-19 17:15:17 -04:00
WantClue
d032f2da4a feat: frequency transition (#747)
* feat: frequency transition

* remove floats that are unnecessary

* fix: callback of set_freq function

* refactor asic model code to asic.c

* fix: change namining scheme
2025-03-09 13:58:13 +01:00
Skot
7dcb69ebdc GammaTurbo support and HW abstraction (#698)
* initial changes for the gammaturbo bringup
* added preliminary TPS546 changes
* added preliminary EMC2103 support
* ASIC temp seems to be maybe working.
* magically now fan seems to have the right polarity
* added in ideality and beta constants (currently unused). Fixed EMC2103_get_fan_speed()
* abstract fan and ASIC temp into thermal functions
* abstracted voltage regulator specifics out of tasks and into power.c and vcore.c functions
* add TPS546 support for multiple models
* move TPS40305/DS4432U vout setter to DS4432U.c
* move all ASIC specific functions to asic.c
* bad device_model nvs handling
* remove old code
* add workaround for TPS546 VIN_UV_WARN_LIMIT silicon bug.
2025-02-11 22:46:56 -05:00
mutatrum
61042d93ae Configure GPIO in Kconfig (#566)
* Put all GPIO defines in gpio_bitaxe.h

* Whitespace

* Use Kconfig.projbuild

* Missing Kconfig
2025-01-04 01:53:56 +01:00
mutatrum
052b8bfda6 Toggle auto_fan_speed without reboot (#580)
If you can change the fan speed immediately, so should the enabling or disabling of auto fan speed.
2024-12-14 00:51:07 +01:00
mutatrum
848c7807ec LVGL All The Things! (#539) 2024-12-11 23:03:58 +01:00
mutatrum
a26cacf0dd Fix setting overheat mode flag on device Max (#522) 2024-11-27 20:13:29 -05:00
Skot
2c41cc9255 Fix a couple missed issues from the fix_warnings PR (#393)
* move ADC_init() before start_http_server() because the UI reads the ADC
* split SYSTEM_init() into separate functions. cleaned up nvs init.
* fix my dumb INA260_init() memory leak
* SYSTEM_init_peripherals() cleanup
2024-10-09 12:52:55 -04:00
Skot
e1bf30b26e Fix compiler warnings (#381)
Fix all compiler warnings and migrate off depreciated ADC and I2C libraries.
---------
Co-authored-by: Erik Olof Gunnar Andersson <eandersson@users.noreply.github.com>
2024-10-08 11:27:32 -04:00
Skot
8b22bb2762 Legacy selftest fixes (#346)
* make sure to VCORE_init() and VCORE_set_voltage() no matter what hw version.

* added "PRESS RESET" to selftest endscreen. pulled out magic numbers to #defines

* oops, cleanup

* update 402 power target

* 403+support

---------

Co-authored-by: Benjamin Wilson <admin@opensourceminer.com>
2024-09-23 16:11:53 -04:00
Benjamin Wilson
b700c6bbf0 Fix overtemp and self tests for gamma (#343) 2024-09-20 19:30:20 -04:00
WantClue
1c66c20561 add transition to power management 2024-09-06 10:37:04 +02:00
Skot
be1242ec61 added TPS546 static power offset. Increased delay for power_management_task.c to start 2024-08-16 22:32:22 -04:00
Skot
4cd7a38b9f rebasing gamma-support on 2.1.10 2024-08-15 18:51:05 -04:00
WantClue
95fb4775ef overheat mode init 2024-08-01 22:58:19 +02:00
Benjamin Wilson
336ed3aaa9 Fix low hashrate, fix overheat boot loop 2024-06-22 19:15:25 -04:00
tommywatson
c011895dff Fixed fan speed web update #141 (#222)
* Fixed fan speed web update #141

These changes fix fan rpm/percent requested and update both on the web

* fix readme

* refactor self_test to be modular for new hardware

* Supra 402 (#221)

* port TCH Supra 402 branch

* refactor TMP1075 (unused?) driver using i2c_master module

* pulled in @Bitmaker-hub stratum_task.c DNS changes from PR #185

* removing serial debug

---------

Co-authored-by: Skot <skot@bitnet.cx>

* adjust share accpeted/rejected functions to take higher level GLOBAL_STATE to fix share accounting.

* Code clean resulting from looking into #218 (#220)

* Code clean resulting from looking into #218

* Fixed asic count

Set canary value for invalid device's asic_count

---------

Co-authored-by: tommy <tommy@tommywatson.com>

* fix another pointer error

* Changes efficiency metric display in AxeOS (#231)

Fixes https://github.com/skot/ESP-Miner/issues/230

* try to explain nonce space duration from paramters (#228)

* try to explain nonce space duration from paramters

* Fix Nonce Space duration for BM1397 (no version-rolling)

* fixed issue with version mask on 1397. added easy serial debugging on 1397

* cleanup jobID debugs

---------

Co-authored-by: Skot <skot@bitnet.cx>

* Update bm1397.c to increase the max frequency to 650Mhz (#209)

* Update bm1397.c to increase the max frequency to 650Mhz

The original version was setting everything above 500Mhz to 500Mhz, the update increases the limit to 650Mhz.
No changes to the web interface - drop-down still shows up to 575Mhz

* Update edit.component.ts to include higher freqeuncy for BM1397

* Updated BM1397 frequencies to above 500Mhz

* Update bm1397.c

* Update bm1397.c

* UN-Update readme.md

* Update bm1397.c

* Update bm1397.c

* Update bm1397.c

* fix: add recovery page (#232)

Adds a recovery web interface to enable users
to recover from a failed www.bin update.
Partial fix for Issue #213.

* refactor: unify merge_bin scripts (#189)

Combines the functionality of merge_bin_update.sh
and merge_bin_with_config.sh into merge_bin.sh.
Also adds more verbose usage printing.

* fix: check www.bin size before updating (#216)

Adds a basic sanity check for www.bin uploading.
Returns 400 if upload is attempted on a file larger
than the available partition space.

---------

Co-authored-by: tommy <tommy@tommywatson.com>
Co-authored-by: Georges Palauqui <g.palauqui@gptechinno.com>
Co-authored-by: Skot <skot@bitnet.cx>
Co-authored-by: Nathan Day <87125117+dadofsambonzuki@users.noreply.github.com>
Co-authored-by: yanir99 <32940160+yanir99@users.noreply.github.com>
Co-authored-by: tdb3 <106488469+tdb3@users.noreply.github.com>
2024-06-20 17:23:53 -04:00
Georges
9dc8c8cad3 try to explain nonce space duration from paramters (#228)
* try to explain nonce space duration from paramters

* Fix Nonce Space duration for BM1397 (no version-rolling)

* fixed issue with version mask on 1397. added easy serial debugging on 1397

* cleanup jobID debugs

---------

Co-authored-by: Skot <skot@bitnet.cx>
2024-06-19 15:29:45 +02:00
Georges
10c331a400 Supra 402 (#221)
* port TCH Supra 402 branch

* refactor TMP1075 (unused?) driver using i2c_master module

* pulled in @Bitmaker-hub stratum_task.c DNS changes from PR #185

* removing serial debug

---------

Co-authored-by: Skot <skot@bitnet.cx>
2024-06-14 16:09:08 -04:00
Georges Palauqui
2dff706225 code refactor: prepare room for HEX 2024-06-12 16:21:59 +02:00
Georges Palauqui
c8789269f9 refactor GLOBAL_STATE argument instead of MODULE only 2024-06-12 15:05:14 +02:00
Georges Palauqui
271d091b03 cosmetic 2024-06-07 15:26:34 +02:00
Georges Palauqui
2d15d447e0 refactor: split vcore out from ds4432 driver, to make it an abstraction of whatever hardware is regulating vcore (making room for TPS546) 2024-06-06 12:14:15 +02:00
Georges Palauqui
22393a4f68 avoid strcmp 2024-06-04 17:06:45 +02:00
pixel::doc
e4fcfdca83 Add more Logging to esp_restart (#179) 2024-05-23 22:55:31 -04:00
Benjamin Wilson
b53b641c68 Remove wifi max retry, remove max fan speed on reboot 2024-05-23 22:34:11 -04:00
Skot
3df855d9b4 Add BM1368 support
co-authored-by: John-Paul Compagnone <jpcompagnone@epicblockchain.io>
co-authored-by: johnny9 <985648+johnny9@users.noreply.github.com>
co-authored-by: Ben <wilsob12@gmail.com>
2024-02-10 13:37:39 -05:00
Ben
ef344f236d added logic for barrel jack and voltage regulator switch, board version 2024-01-13 00:05:45 -05:00
ozbibi
7abda9914c Fix formula for automatic fan control and adjust minimum fan speed (#59)
* Fix formula for the automatic fan control
2023-11-24 23:38:50 -05:00
Ben
dea4a7587b remove log and fix unplugged fan speed 2023-11-14 23:02:42 -05:00
Ben
fc0e49e5d5 automatic fan speed control 2023-11-14 21:59:09 -05:00
Ben
6d9305472f bump version and use const 2023-10-18 07:54:11 -04:00
Ben
7895289f6e Add temperature protection for the BM1366 2023-10-17 22:37:12 -04:00
johnny9
706ee510ba main: Determine ASIC model from NVS
This adds more hardware information to the example config.cvs.
If the model can't be determined at startup, the device will abort.
2023-09-23 14:27:11 -04:00
Ben
a4c473188b Add IP address to display and allow editing of voltage, frequency from AxeOS 2023-09-17 00:01:54 -04:00
Ben
ef71810bba EMC2101 should read internal temp if BM1366 2023-09-06 17:22:08 -04:00
Ben
7f21f5cad9 support for INA260 DNP 2023-08-28 19:56:04 -04:00
DeveloperAlgo
34aac22a3a Update power_management_task.c (#19)
update power management to correct the speed calculations
2023-08-27 23:26:29 -04:00
Ben
8222b913a3 fan speed failsafe for bm1366 2023-08-26 14:23:18 -04:00
Benjamin Wilson
199c151c0f Http-server (#17)
* rename miner to main

* serving out of storage

* axe os

* http server work

* basic stats showing

* update sdkconfig

* SDKCONFIG

* sdk config

* edit page init

* edit pool config

* pool config edit working

* OTA Success

* remove compiled output

* toggle AP mode with boot button

* favicon

* ota website update

* add sdkconfig.ci back

* update readme

* change website build to warning

* Update github workflow to build web dist

* Allow AP mode before STA connection complete

* spacing for johnny :)

* formatting

* Improve connecting to wifi with AP mode

* added working indicator for UI

* formatting

* formatting

* remove redundant sdkconfig in CMakeLists

* vs code format on save workspace settings

---------

Co-authored-by: johnny9 <985648+johnny9@users.noreply.github.com>
2023-08-26 12:21:41 -04:00
Skot Croshere
8880f1702f add fan speed back to ultra 2023-08-22 15:13:43 -04:00
Benjamin Wilson
9bc0671563 Ultra (#15)
Pull BM1366 work into main
2023-08-20 13:09:55 -04:00