cpu info:nrf5340
software:nrf connect sdk 1.6.1
hi professor,
In the uart interrupt I call k_fifo_put to trigger rx process thread but it is not take effect.What person cause this question?


cpu info:nrf5340
software:nrf connect sdk 1.6.1
hi professor,
In the uart interrupt I call k_fifo_put to trigger rx process thread but it is not take effect.What person cause this question?


Hello,
Have you verified through debugging that k_fifo_put() actually gets called?
Thanks,
Vidar
Hello,
Have you verified through debugging that k_fifo_put() actually gets called?
Thanks,
Vidar
I'm sure k_fifo_put was called.
Ok, I don't see any obvious reasons for why the rx thread is not being executed. Does k_fifo_put() keep getting called for every RX event, and does the program continue to run without crashing?
Please make sure CONFIG_ASSERT is set to 'y' in your project and provide me with debug debug logs if you have any. It would also be helpful if you could provide a minimal example so I could try to debug this here.
I added a global variable to record the code execution process.Now I show u.
In uart irq I set the global variable 9.

In gpio irq I set the global variable 10.

In rx process thread I set SENSOR_GPS_TS_TOGGLE 1 and SENSOR_GPS_REV_DONE value 12.
The SENSOR_GPS_TS_TOGGLE is triggered by gpio irq and the SENSOR_GPS_REV_DONE is triggered by uart irq.

The code execution sequence is 9->12->10->1.But actually the code execution sequence is 9->10->12->1.

This shows that your rx thread is indeed running, just not in the order you expected it to. But how to you confirm what the actual interrupt sequence is? I notice that the timestamp at 47 and 49 are the same which indicates that both interrupts were triggered simultaneously.
But how to you confirm what the actual interrupt sequence is? --- The number 9 indicates uart irq running. The number 10 indicates gpio irq running.So actual interrupt sequence is 9->10. The number 9 timestamp is 2375092975 ns.The number 10 timesatmp is 3370454303 ns. That's meaning uart irq not trigger rx process thread unitl gpio irq was called.