8000 Clean up duplicate ASIC reset code by mutatrum · Pull Request #986 · bitaxeorg/ESP-Miner · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Clean up duplicate ASIC reset code #986

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

Merged
merged 3 commits into from
Jun 9, 2025

Conversation

mutatrum
Copy link
Collaborator
@mutatrum mutatrum commented May 30, 2025

Before the initialisation of the ASIC, it's reset. This code is the same for all models, and arguably doesn't belong in the ASIC module. Code is extracted into it's own class and re-used in main and self-test.

mutatrum added 2 commits May 30, 2025 09:46
Build was fine in vscode, not sure why it's failing on GitHub
@@ -20,12 +20,6 @@
#define BM1366_CHIP_ID 0x1366
#define BM1366_CHIP_ID_RESPONSE_LENGTH 11

#ifdef CONFIG_GPIO_ASIC_RESET
Copy link
Collaborator Author
@mutatrum mutatrum May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably never worked, CONFIG_GPIO_ASIC_RESET was undefined here.

@@ -102,6 +103,12 @@ void app_main(void)
queue_init(&GLOBAL_STATE.stratum_queue);
queue_init(&GLOBAL_STATE.ASIC_jobs_queue);

if (asic_reset() != ESP_OK) {
Copy link
Collaborator Author
@mutatrum mutatrum May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subtle change here, needs some testing. The asic is now reset before the serial port is initialised.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do some testing on this

@mutatrum mutatrum added the cleanup Code cleanup label May 30, 2025
@WantClue WantClue added this to the 2.9.0 milestone May 30, 2025
@mutatrum mutatrum changed the title Unify ASIC reset code Clean up duplicate ASIC reset code Jun 1, 2025
@WantClue WantClue merged commit 6414e06 into bitaxeorg:master Jun 9, 2025
2 checks passed
duckAxe pushed a commit to duckAxe/ESP-Miner-Bitaxe that referenced this pull request Jun 11, 2025
* Unify ASIC reset code

* Add missing include

Build was fine in vscode, not sure why it's failing on GitHub

* Move asic_reset  into separate file
@mutatrum mutatrum deleted the unify-asic-reset branch June 11, 2025 21:23
Sign up for free to join this conversation on GitHub. 699E Already have an account? Sign in to comment
Labels
cleanup Code cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0