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

SX1302 general purpose i/o definition #95

Open
vAnArhist opened this issue Jan 10, 2023 · 1 comment
Open

SX1302 general purpose i/o definition #95

vAnArhist opened this issue Jan 10, 2023 · 1 comment

Comments

@vAnArhist
Copy link

Hi all again!) I am working with loragw driver (ported it to esp32), now I need additional info on how can be interrupts mapped in order:

  1. RX done event. In [other discussion] Lora Phy packet receiving. #93 (comment) there was a info about it, I mapped it in function, seems it works.
int sx1302_config_gpio(void) {
    int err;
   ****... OTHER GPIO INIT...****
    err = lgw_reg_w(SX1302_REG_GPIO_GPIO_SEL_6_SELECTION, GPIO_CFG_STATUS);   /* GPIO_6 => RX ON (toggled on each lora packet received) */
    CHECK_ERR(err);
    return LGW_REG_SUCCESS;
}
  1. TX done event. I see on schematic GPIO[2] will toggle, but is there any possibility to map other GPIO for this? If yes, how?
  2. GPIO[8]. How can this be used/mapped?
  3. PPS input. Can it used other than PPS? Could anyone describe how it can be used?
@matthijskooijman
Copy link

Did you ever figure this out?

I've read here that GPIO6 can maybe be used for an RX watermark interrupt. I think that means IRQ when the RX buffer has more than a configured number of bytes, which I think would be perfect to prevent the current 10ms polling approach that is used for the uplink thread, and just waiting for a GPIO event. This should allow the host to actually sleep when there is no data, which I expect could lead to significant power savings (if you also refactor the jit thread to remove the 10ms polling here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants