Communication with DWM1000

Hello,
it’s my first post on this forum, I’m sorry for my English.
I’m using DWM1000 with stm32f407 using the HAL Library with CubeMx.
In my project I use the software of trek1000 ported with HAL library on KEIL. My project is the Tag 0 and I have 4 evb1000 as anchors.
I set my Switch = 0x02.

At the moment, my stm32 and dwm1000 are still perfectly communicating; the dwm send me the correct ID and I can write by SPI.

I’m stuck in Sleep because my dwm doesn’t receive anything from the 4 anchors.

Could you help me?
any advice and suggestions will be greatly appreciated

Thanks

Hi,
in my case I’m stuck in Deep-Sleep porting the TREK1000 in my STM32CubeMX+ECLIPSE+GCC development environment (STM32F415RGT).
These are the changes I’ve made:

In reset_DW1000() function (port.c):

// drive the RSTn pin low
HAL_GPIO_WritePin (DW_RESET_GPIO_Port, DW_RESET_Pin, GPIO_PIN_RESET);
Sleep (2); // RSTn held down for> = 2mS.
// usleep (1);

// put the pin back to output open-drain (not active)
setup_DW1000RSTnIRQ (0);

// Sleep (2);

In setup_DW1000RSTnIRQ function (port.c):

HAL_GPIO_WritePin (DW_RESET_GPIO_Port, DW_RESET_Pin, GPIO_PIN_SET);
HAL_Delay (5);
}

Greetings

thanks, I m trying but I think the problem is other.

Any suggestion of port’s settings?

GPIO_InitStruct.Pin = DW_RESET_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
//GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(DW_RESET_GPIO_Port, &GPIO_InitStruct);

GPIO_InitStruct.Pin = DW_NSS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
//GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(DW_NSS_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : DW_IRQn_Pin */
GPIO_InitStruct.Pin = DW_IRQn_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
//GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(DW_IRQn_GPIO_Port, &GPIO_InitStruct);

GPIO_InitStruct.Pin = DW_SCK_Pin|DW_MOSI_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

GPIO_InitStruct.Pin = DW_MISO_Pin;
//GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
//GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

have I made the port correctly?
[hr]

If I write on register, and then, I would read it, the read must be same as write buffer?