STM32F072 control DWM1000 issue

Firmware/software/electronics/mechanics
Post Reply
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

STM32F072 control DWM1000 issue

Post by justinleeyang »

Refrence your Lps-node-firmware code to control DWM1000. the PB12 connect to DWM1000 reset?

Code: Select all

  /*Configure GPIO pin : PB12 */
  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, 1);

  GPIO_InitStruct.Pin = GPIO_PIN_12;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, 1);
from the dw1000 datasheet, the reset pin may be to reset the dwm1000, then need drive open drain. I use the PA0

Code: Select all

  /*Configure GPIO pin : PB12 */
  HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, 1);

  GPIO_InitStruct.Pin = GPIO_PIN_0;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

  HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, 1);
the dwConfigure(dwm) return result always fail, please help check it.

Code: Select all

dwInit(dwm, &dwOps);       // Init libdw
  dwOpsInit(dwm);
  result = dwConfigure(dwm); // Configure the dw1000 chip
  if (result == 0) {
    printf("[OK]\r\n");
    dwEnableAllLeds(dwm);
  } else {
    printf("[ERROR]: %s\r\n", dwStrError(result));
    selftestPasses = false;
  }
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: STM32F072 control DWM1000 issue

Post by arnaud »

Hi,

The reset pin is not used (yet) in the node code (ops->reset is not implemented) so your initialization failure is likely not related to it.

/Arnaud
Post Reply