Reset pin used as input interrupt

Hi,
i want to get an interrupt when dw1000 enters INIT state after hw reset. I see void reset_DW1000(void) function in port.c file that brings low the pin and then high, but it never set reset pin as interrupt. Can we do something similar to signalResetDone in the port_wakeup_dw1000_fast function?

Thank you

Absolutely you can, just instead of SPI_CS, hold the Reset for a 200 us and then release it. After that set MCU Reset I/O to produce the IRQ, which will indicate chip is in the correct state.
I would recommend adding a weak pulldown to the line during this time.

Please note, in DW1000 some registers could stay initialized after such HW reset (usually that would not affect your application, but in some funny config, you might experience some registers would not have reset). In this case in DW1000, if you want to completely reset the chip, it is recommended to use the “sw reset” API function (dwt_softreset() )

Regards

1 Like

@alliv

hi,

I have a question regarding the software reset API function:

The API looks like this:

void _dwt_disablesequencing(void)
{

_dwt_enableclocks(FORCE_SYS_XTI);

dwt_write16bitoffsetreg(PMSC_ID, PMSC_CTRL1_OFFSET, PMSC_CTRL1_PKTSEQ_DISABLE);

}

void dwt_softreset(void)
{

_dwt_disablesequencing();

dwt_write16bitoffsetreg(AON_ID, AON_WCFG_OFFSET, 0x00);

dwt_write8bitoffsetreg(AON_ID, AON_CFG0_OFFSET, 0x00);

_dwt_aonarrayupload();

dwt_write8bitoffsetreg(PMSC_ID, PMSC_CTRL0_SOFTRESET_OFFSET, PMSC_CTRL0_RESET_ALL);

deca_sleep(1);

dwt_write8bitoffsetreg(PMSC_ID, PMSC_CTRL0_SOFTRESET_OFFSET, PMSC_CTRL0_RESET_CLEAR);

pdw1000local->wait4resp = 0;

}

My question is:

Why is it necessary to disable sequencing if I only want to do a software reset ?

dwt_write16bitoffsetreg(PMSC_ID, PMSC_CTRL1_OFFSET, PMSC_CTRL1_PKTSEQ_DISABLE);

Why is it not just enough to force the device into the INIT state by setting the system clock to XTI ?

_dwt_enableclocks(FORCE_SYS_XTI);

Because API functions were verified by Decawave and released to help engineers like us.

Hi,

Very sad to receive this kind of answer. It would have been really interesting to know if it is really necessary to issue the command PMSC_CTRL1_PKTSEQ_DISABLE if the goal is just a software reset since the command FORCE_SYS_XTI already puts the device into INIT state according to the user manual.

I am very well aware of the fact that for other purposes it is necessary to disable sequencing. However, I was particularly interested in the software reset function.

Anyway, best regards.

Sorry for making your sad.

I have replied to the “lidia” question.

You need to understand the difference between “release” and “hack”.

If Decawave released something, they have reasons to do that in such a particular way.

And maybe your hack will work, I do not know.

Perhaps you can send your CV to Decawave/Qorvo, they are hiring!

Regards.