Problem with DWM1000 and TMS320F28377D

Hello, I have a problem with the DWM1000 and TMS320 working. The problem is that I get the wrong ID. I get either FFFF or 360 (if I connect an IRQ pin or touch the antenna) instead of DECA.
I checked the SPI signals on the oscilloscope, they look normal. I also tested on Arduino UNO, everything works well on Arduino (if connect an IRQ contact or touch the antenna otherwise it will be 0), then everything should be fine with power and connection. On arduino and TMS320, the logic of the code is the same, I just transmit five 0 bytes over SPI to DWM1000, the frequency of SPI in both cases is 2 MHz, the SPI settings are generally the same. I use the same power supply, I just transferred 5 contacts from Arduino to TMS320, I didn’t touch anything else.
I attach oscillograms, SPI settings, as well as the code. I hope that someone has encountered a similar problem and will help. Thank you in advance.

Code:

Settings SPI:

Output in another program that I ported from Arduino
output TMS 1

Hi @Dmitry2000
try to check the reset line and reset the device before you start the SPI.

Cheers
JK

Reset is not connected. I do the reset by turning off and turning on the power. It turns out everything is working fine, the signal on the oscilloscope is correct, the problem was in the command that did not correctly accept input data from SPI.
But now there is another problem. If I transmit zeros, then ID reading goes well, but if I read some register where transmit not 0 (for example I send 0x40 and 0x02), then the correct reading occurs, but very rarely, mostly DWM1000 transmits FF, but if I touch the oscilloscope probe to the power pins on the DWM1000, then the reading becomes normal. There is no such problem on Arduino, the power supply is exactly the same

image

image

Above is the result of the ported program from Arduino. If several registers are read, then everything does not work stably, somewhere it is read correctly, somewhere it is not

Hi @Dmitry2000
I re read you full post.
I want to double check this:

On Arduino it works OK?

The “same” code on TMS320 does not work OK, but on oscilloscope it looks fine? You see the response but TMS320 des not read it?

You have mentioned that when you touch it with the oscilloscope then it starts working OK - can you confirm this?

Cheers
JK

Yes, on Arduino working. But it works if I connect IRQ pin, without connecting IRQ DWM1000 transmit 0. Moreover, if I connect the wire to the IRQ pin on the DWM1000, and hold the end of the wire with your hands, then everything works too. And so it happens on two DWM1000

In addition, I have another DWM1000, it was connected by wires, (now I have two DWM1000 soldered on a breadboard), everything worked well there without connecting IRQ in the case of Arduino, I did not try it on TMS320

I fixed this. “Same” code on TMS320 working. Commands are sent correctly, but the DWM1000 does not always send the correct data if I do not touch the power supply pin of the DWM1000 with the probes

Yes.

I also noticed that if I connect a wire to the IRQ and touch its end with an oscilloscope probe, the DWM1000 will start sending data normally. Or if I touch the antenna with your finger when the IRQ contact is not connected. This is the case with Arduino.
In the case of the TMS320, touching the antenna does not affect anything, but also without connecting the IRQ or pinching it with fingers, nothing works, the DWM1000 transmits 7F if I not coonect IRQ

Hi @Dmitry2000
based on your feedback I see following possible issues:

  1. Double check the GND & VCC between TMS and DWM1000 - it looks like to me that one of them (GND more likely) is broken.

  2. Double check if you have enabled pullup on SPI lines. If I recall it correctly the DW1000 does have pullups on SPI lines, but they are pretty weak.

Cheers
JK

Hello. I have solved the problem with unstable work. I am using an external power supply for the DWM1000, now I have connected the power from the tms320 and everything started working fine

But now there is another problem. IRQ interrupts do not work, the oscilloscope shows 0 volts on the irq pin. The status register indicates that the transfer is in progress. Below is what is read from the SYS_MASK and SYS_STATUS registers

2

Hi @Dmitry2000
Regarding the IRQ - check the status of HIRQ_POL bit inside SYS_CFG register. If it is 0 then the interrupt will be active low.

In other hand if you have powered TMS and DW1000 form different power sources without connected GND between them it is also possible that you have killed the IRQ pin by ESD.

Cheers
JK

On arduino, the same dwm1000 works fine, so irq is not killed. I am currently using power for dwm1000 from tms320

I noticed that the IRQ seems to be working, but it outputs too low voltage. At a high level of 0.2 V, and at a low level of 0 V. Below are the oscillogram at different values of HIRQ_POL

3

6

I fixed the problem, it looks like the problem was a bad wire connection

Hi @Dmitry2000
OK, that what I have expected 8-).

Cheers
JK

Hi, now I have another problem. For some reason, sending is working fine, interrupts are working, sys_status shows that sending is working. But the receiver does not work normal, interrupts sometimes occur, but for some reason in sys_status during these interrupts, the bits responsible for receiving are zero. If during interrupts I turned off the dwm1000 that sends, then interrupts on the receiving dwm1000 stopped. And interrupts occur extremely rarely, basically there are no interruptions, reception does not occur.
Can bad connections be the reason for this ? Although then why sending works well.
The output of sys_status during interrupts of receiver is shown below

11

Often, during interrupts, there is only the AFFREJ bit in sys_status, despite the fact that I turned off frame filtering. And often all sys_status bits are reading as 0, but interrupts occur and if I disable the sending dwm1000, the interrupts stop immediately. If I do the sending, then everything works stably, sys_status is read correctly. I checked sys_mask, everything is configured correctly in it when receiving

Hi @Dmitry2000
is it solved? I think that should check MISO SPI line.

Cheers
JK

I better rewired the contacts, now nothing happens when receiving, there are no interrupts, I read the SYS_STATUS register, reception does not work.
But the transfer is working, interrupts are working, the SYS_STATUS register shows the transfer.
MISO works fine, reads registers correctly and stably.

Registers when I receiving:
image

Registers when I transfer:
image

Hi @Dmitry2000
Sorry I have missed your answer. Is it solved already?

Cheers
JK