-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Modem unresponsive while in radio RX #40
Comments
@flhofer To clarify, the message below is generated by you when communicating with the module? These messages are not generated by the module itself, correct?: The module firmware doesn't appear to be sending the frame counter? |
I do not see any time stamps so I cannot be certain of the timing of the commands. Can you print a time stamp with each line? |
Assuming these commands were used within ms of each other, my understanding is you cannot do so. When the module is processing a command, it is "busy" and ignores any mac commands. |
yes, only
Actually no. All commands work fine. Only if you use the serial at the exact moment the RX window is open, the communication loses some byte. To recreate this, you have to TX commands to the modem exactly when RX1 or RX2 is open (tried both). |
When you attempt to send a command to the module from the SAMD mcu and the module is in the transmit state, the module is "busy" and the module returns a "busy" indication to the SAMD mcu. The 0x01 return code you are seeing in the buffer is the status returned from the module which is LORAMAC_STATUS_BUSY. More specifically, this busy status is returned by the module when LoRaMacState is in the LORAMAC_TX_RUNNING state and a mac command is sent to the module from the SAMD mcu. mkrwan1300-fw/Middlewares/Third_Party/Lora/Mac/LoRaMac.c Lines 2688 to 2701 in b1c48b2
This busy status indicates the module is busy and refuses to process the command. So the commands you are issuing after the UTX are being ignored. When you issue a UTX while the module is busy, the frame cannot be queued and lora_send() returns LORAMAC_STATUS_BUSY. mkrwan1300-fw/Projects/Multi/Applications/LoRa/AT_Slave/src/lora.c Lines 726 to 739 in b1c48b2
|
@sslupsky yes, I know that the modem might answer with By hangs I mead that it does not send an answer. The reason for this is that vcom.c passes an error character 0x01 to the top level, command.c or at.c. I already verified this. In fact, all commands except sendV2 give also an Last week I did some code changes to my little project so that the UTX is sent a few ms earlier. The error does not show up anymore. Never. So it is a thing where AT serial interrupt and the Radio ISR routine are active at the same time. Some sort of race condition, buffer full or too long ISR, as said. A thing that I couldn't find out is a convention detail: Florian |
@flhofer I am confused. It appears by your reference to the timeout that you are experiencing an issue with the arduino library, not the module firmware? I believe the code segments I referenced earlier are convincing? The module firmware appears to ignores everything (including getters) if it is busy when the request arrives. |
@sslupsky no, I'm only talking about the Firmware. The firmware does not return any return codes. It either responds with Please try it out if it's still unclear. Between TX-end and next write, there should be exactly 1 second for the error to show up. I'm just asking If someone can explain the vcom buffer overflow. I mean, considering a baud rate of 19200, 8 bytes are filled in half a millisecond, @48MHz, that should be 24k LL instructions, a pretty high number. So the actual ISR elaboration speed should mostly depend on the SPI-modem backed. If there is no bug, and the |
Hi,
I'm opening this issue here as I found it to be a bigger problem I can not solve on my own. I was able to drill it down to one point.
Whenever the modem opens the RX window, the serial does not react anymore and I get an 0x01 (error character) passed from the vcom module. It seems to be that the RX window is triggered by a timer (in MiddleWare/Util/timerServer) and then configured and run. As these software timers are actually called from the underlying HW alarm interrupt, I imagine that the whole setup and window configuration runs inside an ISR.
vcom picks new chars entering triggered as an ISR. So, IF interrupts are disabled, vcom will not be able to parse newly incoming chars from the serial to the main SAMD and will overflow once the 8 Symbol hardware buffer is full. Consequently, it puts an 0x01 char in line signaling
ERR_RX
.So far so good.
So, my question is, how come the ISR managing RX windows takes so long. Isn't the modem signaling reception through timers or interrupts. Did anyone look into this before?
Just to show you what happens, here is some output
If I change to poll time (FCU-MSIZE-UTX), it either does not show up or during another command, e.g. once I had it at MSIZE.
Specs:
FW 1.2.4 (from my pull request)
Library Matching -- from my pull request.
The text was updated successfully, but these errors were encountered: