For each case, I clear the corresponding event bit :
if(status & SYS_STATUS_RXFCG)
{
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_ALL_RX_GOOD); // Clear all receive status bits
…
}
// Handle TX confirmation event
if(status & SYS_STATUS_TXFRS)
{
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_ALL_TX); // Clear TX event bits
…
}
// Handle frame reception/preamble detect timeout events
if(status & SYS_STATUS_ALL_RX_TO)
{
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_RXRFTO); // Clear RX timeout event bits
…
}
// Handle RX errors events
if(status & SYS_STATUS_ALL_RX_ERR)
{
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_ALL_RX_ERR); // Clear RX error event bits
…
}
This code comes from the Decawave API…
Le mardi 21 mars 2017 16:32:52 UTC+1, Mark Odell a écrit :
You need to read SYS_STATUS, for your own use, and then write SYS_MASK with zero to clear the interrupt assertion by the DW1000.
On Tue, Mar 21, 2017 at 11:09 AM, xaviervause xavie...@gmail.com wrote:
Hi all,
I’m working on a STM32F205, and I’m using a double range algorithm with interrupts.
Sometimes (I think especially when more than 1 tag communicate to 1 anchor), the IRQ stay high, and I get stuck in
do
{
if (port_deca_isr != NULL)
port_deca_isr();
} while (port_CheckEXT_IRQ() == 1);
In dwt_isr(), I go through any event :
if(status & SYS_STATUS_RXFCG)
{
…
}
if(status & SYS_STATUS_TXFRS)
{
…
}
if(status & SYS_STATUS_ALL_RX_TO)
{
…
}
if(status & SYS_STATUS_ALL_RX_ERR)
{
…
}
Do you have already got something like this ?
Any idea to manage this ?
Thanks,
Xavier