cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL "DEBUG_SUBGHZSPI" alternate functions to debug Radio SPI ?

OFauc.1
Associate II

Hi all.

I found out there are specific DEBUG_SUBGHZSPI_* alternate functions (DS13105 STM32WLE5xx)

.

But there is not much information about these functions.

Can these AF be used to 'mirror' SUBGHZSPI pins for debugging / captures ?

Thanks

Olivier

1 REPLY 1
YBOUV.1
Senior

Hi,

in Core/Src/sys_debug.c, these pins can be activated with by setting the DEBUGGER_ON to 1

Please, see the code below:

/*Radio Spi Dbg  on  PA4/5/6/7*/
 
  GPIO_InitStruct.Mode   = GPIO_MODE_AF_PP;
 
  GPIO_InitStruct.Pull   = GPIO_NOPULL;
 
  GPIO_InitStruct.Pin    = (GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7);
 
  GPIO_InitStruct.Alternate  = GPIO_AF13_DEBUG_SUBGHZSPI;
 
  __HAL_RCC_GPIOA_CLK_ENABLE();
 
  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 
 
 
  /* Busy  on PA12*/
 
  GPIO_InitStruct.Mode   = GPIO_MODE_AF_PP;
 
  GPIO_InitStruct.Pull   = GPIO_NOPULL;
 
  GPIO_InitStruct.Pin    = (GPIO_PIN_12);
 
  GPIO_InitStruct.Alternate  = GPIO_AF6_RF_BUSY;
 
  __HAL_RCC_GPIOA_CLK_ENABLE() ;
 
  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);