Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Add the possibility to not use interrupt for events but to poll for them #89

Closed
Anacron-sec opened this issue Sep 27, 2018 · 8 comments
Closed
Labels
enhancement New feature or request

Comments

@Anacron-sec
Copy link
Contributor

This will decrease performance but make the program more stable because there will never be interrupt when they (the interrupts) are locked.

@Anacron-sec Anacron-sec added the enhancement New feature or request label Sep 27, 2018
@Elon-Wang
Copy link
Contributor

Hello~
I come from the project of Thomas' project and work on this modules for a while, and there is a problem confused me for a long time.

Although I read most of Thomas' code, including DW1000Raing.cpp and DW1000.cpp. I don't really understand when will the interrupt happens.

When I source back to the attachInterupt() function, I know it happens when the IRQ pin changes but I don't know when the IRQ pin change. I guess it will be changed when it sent/receive a message, but I don't see any codes about changing that pin, is it depends on the inside circuit or I not found it?

Thanks for your reply!!!

@Anacron-sec
Copy link
Contributor Author

Anacron-sec commented Oct 10, 2018 via email

@Elon-Wang
Copy link
Contributor

Yeah it is an inside mechanism of the dw1000 itself, there is a register inside the chip that controls when to send an interrupt relative to the selected elements.(we add a struct and a method to select them)

On Wed, 10 Oct 2018, 18:32 Elon-Wang, @.***> wrote: Hello~ I come from the project of Thomas' project and work on this modules for a while, and there is a problem confused me for a long time. Although I read most of Thomas' code, including DW1000Raing.cpp and DW1000.cpp. I don't really understand when will the interrupt happens. When I source back to the attachInterupt() function, I know it happens when the IRQ pin changes but I don't know when the IRQ pin change. I guess it will be changed when it sent/receive a message, but I don't see any codes about changing that pin, is it depends on the inside circuit or I not found it? Thanks for your reply!!! — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#89 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AWi_Nrr0fA7MA1igye45TxwhtCkmmt3kks5ujiEWgaJpZM4W8F7Z .

Thank you for your reply, that really helps me a lot!! I finally find someone who can answer my question.😊😊

After I set the antenna delay, the one to one ranging become precise however when I use three anchors and one tag to do the ranging, there are only one pair of ranging turn out to be reliable, while the other two are quite wrong. The anchor with right raging data is random. For example, if I have three anchors A B C, and turn them on, only A get the right ranging data. However, If you turn anchor A off, one of the rest anchor will work well, the other is still reading the wrong distance. The same phenomenon happens when you turn the second anchor off.

Then I turn them down and using the anchor which is works well to print out the timestamp of Poll/PollACK/Ranging , and calculate the reply1 round1, reply2 , round2. It's strange to see reply1 is bigger than round1 sometime, which is ridiculous. However, those ridiculous timestamps can calculate out the right distance using the formula (Tround1 * Tround2 - Treply1 * Treply2)/ (Tround1 + Tround2 + Treply1 +Treply2) .

Have you ever encounter with the same problem? Is this out of the non-calibration of crystal oscillator,if yes,how to do it? If you know the reason, please tell me how to solve it.

I'm very grateful!!!

@Anacron-sec
Copy link
Contributor Author

Anacron-sec commented Oct 10, 2018 via email

@Elon-Wang
Copy link
Contributor

So, you haven't try multiple anchors locate yet?
We can discuss later, lol
Time is very late in my time zone and I have lots of courses in tomorrow~
I'll open an issue soon and introduce more about my issue.
Anyway, thanks a lot for your help.

@Anacron-sec
Copy link
Contributor Author

Anacron-sec commented Oct 10, 2018

Yeah, we rewrote a lot of the thotro's driver, this is still a work in progress, we wanted to get rid of DW1000Ranging as a loop and instead to make it a library compliant with ISO/IEC-24730/62 to leave the user with more control over the action flow.
I was asking about how you did the 3 anchor range because thotro's library doesn't use frame filtering, so every anchor will be receiving the messages from the tag and probably overlapping when responding. When we finish making the examples using the ISO standard MAC format we will check if the frame filtering code needs to be adjusted. For the moment you could try to add a destination address inside the sent data and check at the receiver if it was for it and discard other anchor's frames.(the standard uses both source and destination addresses).
Feel free to ask any questions! Glad to help

@Anacron-sec Anacron-sec changed the title Add the possibility to not use interrupt but to poll for them Add the possibility to not use interrupt for events but to poll for them Oct 23, 2018
@Sonic0
Copy link
Contributor

Sonic0 commented Jan 11, 2019

I think that we could close this issue @an4cr0n

@Sonic0
Copy link
Contributor

Sonic0 commented Feb 20, 2019

done

@Sonic0 Sonic0 closed this as completed Feb 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants