Hello,
I tried to enable the PTA peripheral on stm32WBA63. Seems like it's not generating any initializing code regarding the PTA. Neither any example is provided how to do so.
It tried manually to enable the PTA, but its still not working. I still see the ble advertising. I am attaching the sample ioc file.
What I tried manually, is
#define PTA_ACTIVE_Pin GPIO_PIN_4
#define PTA_ACTIVE_GPIO_Port GPIOB
#define PTA_GRANT_Pin GPIO_PIN_15
#define PTA_GRANT_GPIO_Port GPIOB
GPIO_InitTypeDef GPIO_InitStruct = {0};
GPIO_InitStruct.Pin = PTA_ACTIVE_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = 0x0C; // AF for PTA_ACTIVE_Pin
HAL_GPIO_Init(PTA_ACTIVE_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = PTA_GRANT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = 0x0A; // AF for PTA_ACTIVE_Pin
HAL_GPIO_Init(PTA_GRANT_GPIO_Port, &GPIO_InitStruct);
//Initalize the PTA
// According to RM0515, 10.5.1(PTACONV_ACTCR), register
// TACTIVE value is 0x14 to 0x96
pta_error err = pta_init(0x15);
if (err != PTA_ERROR_SUCCESS)
{
}
err = pta_enable(PTA_ENABLED);
if (err != PTA_ERROR_SUCCESS)
{
}
Thanks