Master-slave DW1000 chips switching problem

I’m recently using DWM1002 to calculate distance and angle between anchor and tag. Everything goes on well since I encountered such problem. According to the official documents, I might be easily switching master and slave dw1000 chips by using command NODE. But the problem is, it didn’t work when I sent NODE 1 to anchor via UART. By the time I sent NODE to anchor to restore the task, everything went back to normal.
And then I tried to modify the Pin definition, shown in the picture below.%E5%BC%95%E8%84%9A%E4%BF%AE%E6%94%B9
To my surprise, the situation went upside down. Under the circumstances, I need to send NODE 1 to start the correct mission. When I sent NODE 0/ NODE to anchor via UART, nothing happened.
Can anyone of you guy help me out of this proble? Or explain to me which way is the correct way to switch chips??
Best wishes!

I also didn’t see anything happen after sending “stop” + “node 1”. I found the pertinent code in cmd_fn.c, in function f_node. Looks like this should work.

Thanks for your concerning, but the truth is that even though I used function xEventGroupSetBits to Node_B_Task for switching manually, it didn’t work as well. So the function f_node won’t work. Anyway, thank you for your reply.

Can you tell me what is a HW version of the Node you are using?
Eg. does it have “PDOA-NODE-DWM1002 V2” string on the PCB (this means it’s v2, otherwise it’s v1).

Yes, it does. It’s V2.

I’ve tried all your changes on V2 but it doesn’t work for me. And it looks weird - you changed almost everything including SYNC pins, can you tell why?

I’ll try to investigate the A/B switching problem, it definitely should work, it works fine on the previous HW.

The reason why I changed the SYNC pin is that I designed my own PCB boards which use the same theory for measuring, i.e same code running on a different board. So I need to change every concerning pins to run the code correctly. I also tried to switch on the official board, but result is all the same. So can you tell me why? Or which way to do the switch is the best way?

This makes sense )))

I’ve found the reason, thank you.

Can you share the solution, please?

During the initialization, slave’s IRQ pin didn’t init for interruption. So slave chip won’t cause an interruption even if you succeed in switching. After adding that, I succeed in switching.

2 Likes

Do you mind sharing the code for this solution. I tried initializing PIN B but I still don’t get the tx done callback. I may have missed something.