cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to get the advertising state

LVent
Associate II

Hello,

I'm trying to get the advertising state from a new Cube MX project.

I followed the step by step, did all the initializations and compare with the P2Pserver exemple.

Everythings seem to be ok but I can't get this state work.

It seems that the program stay blocked (Program received signal SIGINT, Interrupt.) in infinite loop when it tries executing SCH_Run() for the first time .

The IRQ occurs just after the "SuperMask &= mask_bm;" line in SCH_Run()

Because of that, the program doesn't execute APP_BLE_Init( void ) and I can't get the advertising state, so the program doesn't go into the round_robin loop.

 It is as if "SCH_RegTask( CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID, shci_user_evt_proc );" in "appe_Tl_Init()" didn't register the task well.

Thanks you for helping me.

7 REPLIES 7
LVent
Associate II

I didn't receive the ready event "VS_HCI_C2_Ready" from the CPU 2.

Any ideas ?

Christophe Arnal
ST Employee

Hello,

Could you please check the availability of the following code in the file stm32wbxx_it.c

void IPCC_C1_TX_IRQHandler(void)
{
  HW_IPCC_Tx_Handler();
 
  return;
}
 
void IPCC_C1_RX_IRQHandler(void)
{
  HW_IPCC_Rx_Handler();
  return;
}

Basically, at startup, as soon as the Ble Stack wireless is started, you shall receive an event.

The flow is

From interrupt context

IPCC_C1_RX_IRQHandler()

shci_notify_asynch_evt() - This callback is used to move from the interrupt context to the back ground context

From background context

APPE_SysUserEvtRx()

Regards.

HSing
Associate II

did this fix work for you? because I have a similar problem and still not able to advertise. Do I need to add more settings/ configuration. I followed the steps mentioned in application note 13.1 .

Hello,

it worked for me.

Please also make sure that the required sections are linked into SRAM2. Please see:

https://community.st.com/s/question/0D50X0000Az4HdhSQE/cant-get-the-advertising-state

Christophe Arnal
ST Employee

​Hello,

Is the issue still there ?

Regards

AValt.1
Associate II

Hello,

I have sometimes same problem after a power on reset, i receive the APPE_SysUserEvtRx event but Advertising is not always started.

I do always receive shci_notify_asynch_evt, i followed p2p_ota_server_example.

Any idea?

Best regards

�?lvaro

AValt.1
Associate II

Hi,

i receive APPE_SysUserEvtRx event, but not always Advertising is started, i followed p2p server example.

It seems that the adv_req function does not finish sequentially, it exits before executing every line in the function, and without any return instruction.

I think it's a problem with HSE oscillator, after Switching a signal the microcontroller stays stuck until reset, but not nmiHandler or other event is generated, even with the CSS protection enabled. Changing to internal oscillator before changing the signal value seems to make it work.

Any help?

Regards

�?lvaro