TobleMiner / lmic-esp-idf

A good port of the LMIC LoRaWAN library to esp-idf
42 stars 15 forks source link

GPIO_PIN mask error on start #3

Closed malachib closed 4 years ago

malachib commented 4 years ago

Host Environment: Debian, esp-idf SDK 3.3 Target Device: LoPy4

My initialization settings are as follows:

const lmic_pinmap lmic_pins = {
    .spi = { /* MISO */ 19, /* MOSI */ 27, /* SCK */ 5 },
    .rxtx = LMIC_UNUSED_PIN,
#ifdef PGESP_LOPY1
    .nss = 17,
    .rst = 18,
#else
    .nss = 18,
    .rst = LMIC_UNUSED_PIN,
#endif
    .dio = {23, 23, 23} //workaround to use 1 pin for all 3 radio dio pins
};

Based on the discussion here https://forum.pycom.io/topic/3403/wiring-of-dio-pins-of-lora-sx127x-chip-to-esp32/5

My error capture looks as follows:

     lmic: Starting IO initialization
E (393) gpio: GPIO_PIN mask error 
I (403) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (403) lmic: Finished IO initialization
I (413) lmic: Starting SPI initialization
I (413) lmic: Finished SPI initialization
I (423) lmic: Starting initialisation of timer
I (423) lmic: Finished initalisation of timer
I (433) lmic: Wait until
I (433) lmic: Done waiting until
I (443) lmic: Wait until
I (533) lmic: Done waiting until
E (533) lmic: LMIC HAL failed (../components/lmic-esp-idf/src/lmic/radio.c:689)
E (5533) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (5533) task_wdt:  - IDLE0 (CPU 0)
E (5533) task_wdt: Tasks currently running:
E (5533) task_wdt: CPU 0: main
E (5533) task_wdt: CPU 1: IDLE1

What do you think is going wrong?
Thanks for the port by the way!

EDIT: I am 90% sure the PR #4 resolves this, though I am not able to fully test it