-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/esp32: WDT reset in example/lorawan #11443
Comments
@yegorich IMHO, the issue title is somehow misleading. It suggests that it is a problem of threaded applications and threaded application aren't working at all. There are a large number of threaded applications like |
I have such a feeling that applications providing a shell don't suffer from this issue. lorawan example just ends with a return after sending the first message:
Is there any official way to end the main thread in an event loop? |
This shouldn't be the reason. According to your log, this
does not return. Could you identify which function does not return by inserting printf debug messages? My guess is that As I understood, |
Yes, lorawan initialization never goes beyond How can I add printfs to LoRaMac-node? Every time I invoke make it seems to clone this repository from scratch and all my changes will be removed:
|
The only way to change something in the source code of a package is to generate a patch file in |
OK. I see. Btw adding a shell to lorawan example automagically solves my problem:
|
Confused 😕 BTW, the threads that are running are exactly the same for both applications when
|
I thought that it might have to do with some module dependencies when module |
This is something I would also like to know. This happens either only to me or T-Beam. @fcgdam has ported TTGO Lora V1 to RIOT (https://github.com/fcgdam/RIOT_TTGOESP32_LORA_V1) and doesn't seem to encounter this issue. |
To make the things even more confusing, just disabling
|
Hi: I had issues, but not board resets. Edit: Remember it: The board definition for the SX1276 pins did change. Can you try this definition: #define SX127X_PARAMS { /.spi = SX127X_PARAM_SPI,/ |
Hi: |
Thanks for the test. Good to know, I am not the only one. Have you also tried to compile with I have the same issue with an application reading GPS and trying to parse it. The basic structure is the same as So it is not LoRa related. |
Commit 9aa8c61 is derived from a master before PR #10883 was merged. You would have to compare commit 33a4b30 (the commit on which PR #10883 bases) with commit 35c617e (the first commit after the merge of PR #10883). If 33a4b30 works but 35c617e not, the problem might be (or better is 😎) caused by the refactoring of Xtensa vendor code with PR #10883 what would seem to be reasonable. Before PR #10883, |
Thank you a lot for testing 😄 Even though these are really bad news, they make sense. I will have to compare line by line what the differences are. Unfortunatly, I made these changes almmost a half year ago and I don't remember exactly how big the differences in case of @yegorich |
I could figure out the cause of the problem. With commit 28d9599, I introduced the following "fix", at least I thought it would be a fix. --- a/cpu/esp32/thread_arch.c
+++ b/cpu/esp32/thread_arch.c
@@ -186,1 +186,1 @@ char* thread_stack_init(thread_task_func_t task_func, void *arg, void *stack_sta
- p = (uint32_t *)(((uint32_t) top_of_stack+1 - XT_CP_SIZE));
+ p = (uint32_t *)(((uint32_t)(top_of_stack + 1) - XT_CP_SIZE) & ~0xf); But in fact, it was a bug 🕶️ Since Reverting the change seems to work. Even though I have no working LoRaWAN gateway, I could see the following outputs with my Heltec WiFi LoRa 32 V2.
|
I will provide a PR which fixes the problem. BTW, |
Hi thanks:. No issue whatsoever waiting for a fix for me. I'm also quite busy with other things :) Not sure about @yegorich. |
@gschorcht great news! That was fast. I can test your fix next week as soon as I'm in my office. Btw. I'm using N-Fuse card for LoRaWAN tests. @fcgdam have you thought about upstreaming your board definition? |
Hi! Did the change manually (removed the & ~0xf) and it works now! So the issue seems to be this. @yegorich Regarding up-streaming my board definition not quite sure if its at a good RIOT-OS standard (Missing Arduino pins, and so on), so that was the main reason why I didn't create a PR, and so let users find it out the board definition by themselves :) |
@fcgdam I think Adruino pins are optional. I'm going to drop them. If someone really needs this functionality, it can be added later. Btw. you don't have to specify |
I'm porting TTGO T-Beam board to RIOT (#11418). Executing
examples/lorawan
produces following output:tests/pkg_semtech-loramac
is working without an issue and I can join a LoRaWAN network and send/receive packets.@gschorcht suggested to enable syscall debug messages to see when
system_wdt_feed
is called the last time. The console output shows that it will be called before loramac init and 6 seconds later WDT resets the system.Steps to reproduce the issue
Flash examples/lorawan on a TTGO T-Beam board.
Expected results
LoRaWAN example starts and tries to join the network and sends packets.
Actual results
The system will be reset via WDT.
Versions
Riotdocker was used to build the application.
The text was updated successfully, but these errors were encountered: