Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

sx127x: Add support for ValidHeader IRQ required for preamble detection #41

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

plaes
Copy link
Contributor

@plaes plaes commented Nov 2, 2023

With sx127x there is no single "IRQ detected" pin for MCU, instead it has six different DIO pins which all have varying roles.

In order to get preamble detection working (and to be able to join LoRaWAN network) make sure DIO3/ValidHeader IRQ are configured.

Copy link
Collaborator

@lucasgranberg lucasgranberg left a comment

Choose a reason for hiding this comment

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

lgtm those debug statements could probably be traces as the log is pretty noisy as is but that is a separate issue

@plaes
Copy link
Contributor Author

plaes commented Nov 3, 2023

This approach won't actually work as HeaderReceived IRQ can only be detected via interrupt on DIO3 (or alternatively by polling the irq status register):
image

I remember seeing from the recommended design document that it is recommended to connect at least dio0..dio3 to your MCU.

Also dropped one additional debug message about HeaderValid flag.
@plaes plaes force-pushed the preamble-detection branch from cd54188 to 16dfbb9 Compare November 7, 2023 11:46
@plaes plaes requested a review from lucasgranberg November 7, 2023 11:48
@plaes plaes changed the title RFC: sx127x: Enable ValidHeader IRQ for preamble detection sx127x: Add support for ValidHeader IRQ required for preamble detection Nov 7, 2023
@plaes plaes force-pushed the preamble-detection branch from 16dfbb9 to c8c6af7 Compare November 7, 2023 12:34
@lucasgranberg lucasgranberg merged commit ae7231a into embassy-rs:main Nov 17, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants