Repository navigation
Fix issue where HackRF Pro (H4M) cannot enter HackRF mode normally. - #18
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request aims to fix an issue where the HackRF Pro (H4M) device cannot enter HackRF mode normally. The PR adds support for loading FPGA bitstreams from SPIFI flash in RAM_MODE, enabling the device to transition from "PP mode" to HackRF mode successfully.
Changes:
- Modified power initialization in PRALINE builds to enable 1v2 and RF power in RAM_MODE
- Added new FPGA image loading path for RAM_MODE that loads from SPIFI flash
- Introduced conditional compilation logic to handle DFU_MODE, RAM_MODE, and normal HackRF mode differently
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 15 comments.
| File | Description |
|---|---|
| firmware/hackrf_usb/hackrf_usb.c | Modified power initialization for RAM_MODE and added conditional FPGA loading based on mode (DFU/RAM/normal) |
| firmware/common/fpga_image.c | Added new FPGA loading function and infrastructure for loading from SPIFI flash, though with several implementation issues |
Comments suppressed due to low confidence (1)
firmware/hackrf_usb/hackrf_usb.c:286
- The change removes the RAM_MODE check for enabling 1v2_power and rf_power. Previously, these were only enabled when NOT in DFU_MODE and NOT in RAM_MODE. Now they're enabled in RAM_MODE as well. The comment says "hackrf mode ram should open this" but doesn't explain why this change is safe. Please verify this doesn't cause hardware issues when booting in RAM_MODE, especially since RAM_MODE firmware may have different power requirements.
#if !defined(DFU_MODE)
enable_1v2_power();
enable_rf_power();
clock_gen_init();
#endif
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
its a debug code,I forget to remove it
---- Replied Message ----
| From | ***@***.***> |
| Date | 02/20/2026 15:45 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [portapack-mayhem/hackrf] Fix issue where HackRF Pro (H4M) cannot enter HackRF mode normally. (PR #18) |
@gullradriel commented on this pull request.
In firmware/common/fpga_image.c:
+ while(1);
+ return false;
hmm this should just return false ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
|
Please fix the build issues on the GitHub actions |
|
Please also convert comments to English. Feel free to use AI to convert them |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LCD,RX MODE and FPGA can use normally