Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

e22-400m33s recieve interrupt #1010

Closed
whoim2 opened this issue Mar 10, 2024 · 3 comments
Closed

e22-400m33s recieve interrupt #1010

whoim2 opened this issue Mar 10, 2024 · 3 comments

Comments

@whoim2
Copy link

whoim2 commented Mar 10, 2024

Hello. Have esp32s2 & this module.
The board is my design, for the E32-400M module and works with it. There is a 1278 chip. The current one is 1268.
I corrected the ping pong example from 1262 to 1268 and the following happens:
[SX1262] Initializing ... success! [SX1262] Sending first packet ... operationDone transmission finished! start_rcv
That is, the first sending is triggered, the dio1 interrupt is also triggered (the transfer is completed), the module starts receiving and never leaves it, although according to the logic of the example it should repeat the sending once a second. Or is this normal behavior for this example?
esp connected to dio0 (busy) and dio1 of module, 1278 use dio0 for interrupt, 1268 use dio1, right?

Code here
33 is dio1, 21 is dio0

@jgromes
Copy link
Owner

jgromes commented Mar 10, 2024

the module starts receiving and never leaves it, although according to the logic of the example it should repeat the sending once a second.

No, if the first module never hears back then it will not attempt to send another packet.

Looking at the code and the ping pong example itself, it seems to be missing ICACHE_RAM_ATTR for the interrupt service function setFlag. Can you try adding it?

#if defined(ESP8266) || defined(ESP32)
  ICACHE_RAM_ATTR
#endif
void setFlag(void) {
  // we sent or received  packet, set the flag
  operationDone = true;
}

@whoim2
Copy link
Author

whoim2 commented Mar 10, 2024

No, if the first module never hears back then it will not attempt to send another packet.

Then there is no problem, I'm trying to use one module.
Actually the simple example I used was because my working code for 1278/1276 didn't work with 1268. This is an RC radio control system. ICACHE_RAM_ATTR is present there. It looks the same: the first transmission is in progress, but for some reason there is no interrupt, although in this example there is one (end of transmission).

Later I will try to refine your example for constant transmission on timeout (no response), and if everything works, I will look for the reason in my main code. Thanks!
I'm not closing the topic yet, I'll post the result soon.

@jgromes
Copy link
Owner

jgromes commented Mar 10, 2024

It seems to me there is no actual issue in that case. Hence I will convert this to a discussion instead.

Repository owner locked and limited conversation to collaborators Mar 10, 2024
@jgromes jgromes converted this issue into discussion #1011 Mar 10, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants