cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL55 MX_IPCC_Init() error from config tool.

Xynium
Associate III

On STM32WL55, i have made a skeleton for an app including subghz in fsk, with mx config tool. When building i get an error on one core and warning on the other about MX_IPCC_Init(),

wich is declared static in main.c and used in main so i can thing the init is done.

from ipcc_if.c :

void IPCC_IF_Init(void (*IPCC_IF_CommandRcv_cb)(uint32_t channelIdx),

                 void (*IPCC_IF_AcknowledgeRcv_cb)(uint32_t channelIdx))

{

 /* USER CODE BEGIN IPCC_IF_Init_1 */

 /* USER CODE END IPCC_IF_Init_1 */

 /*Initialise the ipcc, initialises MSP*/

 MX_IPCC_Init(); <- ERROR undeclared

 /* Enable C2AHB3 peripherals clock. */

 LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_IPCC);

 /* IPCC EXTI (AIEC) line fo

Regards

JP Lathuile

2 REPLIES 2
Xynium
Associate III

Hi

Got a solution.

In the config tool

in project manager/advanced setting uncheck static witch is checked by default

Regards

JP

luigi.calligaris
Associate

Looks like a bug in the templates that should be taken care of by ST. I replaced that call with the following code, copypasted from the main() template and got ipcc_if.c compiling.

 IPCC_HandleTypeDef hipcc;
 hipcc.Instance = IPCC;
 if (HAL_IPCC_Init(&hipcc) != HAL_OK)
 {
  Error_Handler();
 }

Not yet sure if it behaves correctly yet. I can see that HAL_IPCC_Init() (defined in Drivers/STM32WLxx_HAL_Driver/stm32wlxx_hal_ipcc.c) will reset number of CPU registers.

#if defined(CORE_CM0PLUS)
    IPCC_CommonTypeDef *currentInstance = IPCC_C2;
#else
    IPCC_CommonTypeDef *currentInstance = IPCC_C1;
#endif
 
    if (hipcc->State == HAL_IPCC_STATE_RESET)
    {
      /* Init the low level hardware : CLOCK, NVIC */
      HAL_IPCC_MspInit(hipcc);
    }
 
    /* Reset all registers of the current cpu to default state */
    IPCC_Reset_Register(currentInstance);
 
    /* Activate the interrupts */
    currentInstance->CR |= (IPCC_CR_RXOIE | IPCC_CR_TXFIE);
 
    /* Clear callback pointers */
    IPCC_SetDefaultCallbacks(hipcc);
 
    /* Reset all callback notification request */
    hipcc->callbackRequest = 0;
 
    hipcc->State = HAL_IPCC_STATE_READY;