receiving with interrupt callback not working
See original GitHub issueHi,
I have set the dio_0
pin number in config.py
and changed the code in examples/LoRaReceiver.py
as following:
def receive(lora):
print('LoRa Receiver Callback')
def cb(payload):
lora.blink_led()
print(payload)
lora.on_receive(cb)
lora.receive()
But it didn’t work - couldn’t receive any data. It only worked with while True
loop as shown in the original example.
Did I miss something? Pls help!
It’s an AI-Thinker Ra-02 LoRa module with ESP32. The MicroPython firmware is V1.13 stable.
I used the sx127x driver in the master branch, and the readme title is uPyLora.
Issue Analytics
- State:
- Created 3 years ago
- Comments:20
Top Results From Across the Web
STM32 UART interrupt with callback not working
When I run debug, I am not able to receive UART messages. Here's the main and the callback function parts of the program:...
Read more >SPI Receive interrupt callback not being called - ST Community
I am using it to receive data from an ADC chip over SPI. The ADC chip has a data ready output which should...
Read more >Not able to call a function inside the gpio interrupt callback ...
I am facing an issue in my program where i am typing to call a function inside the gpio interrupt callback function. i...
Read more >UART receive interrupt stops triggering after several hours of ...
My UART callback function works without any issue. But after several hours, UART receive interrupt stops working and UART cannot receive ...
Read more >dsPIC33EP32GP502 CAN Received Interrupt not working ...
CAN1 Receive callback function */ void CAN1_RxBuffer(void) { CAN1_Receive(&rx_msg); // CAN1 Receive buffer application code if ((rx_msg.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You need to change the
if
statement inside thehandle_on_receive
to:if irq_flags & IRQ_RX_DONE_MASK == IRQ_RX_DONE_MASK:
, then it will work.So it should look like:
Hi @Bujtar ,
As Peter pointed out in his post, you can use
ThreadSafeFlag
, as per the example shown here.