Infineon / AIROC-Wi-Fi-Bluetooth-STM32

The STM32 Connectivity Expansion Pack is an extension of the CMSIS-Pack standard established by Arm to support Wi-Fi and Bluetooth LE application on STM32 MCUs with Infineon Wireless Combo devices.Infineon STM32 Connectivity Expansion Pack
Other
48 stars 10 forks source link

BLE error: STM32H723 + Sterling-LWB5 #10

Closed jbiemar closed 8 months ago

jbiemar commented 1 year ago

Question/Issue:

I succeed to use SDIO for Wi-Fi but I have error with UARt for BLE. Can you help me with this ?

Context

I follow the STM32 connectivity pack user guide (chapter 7, new project from scratch) to use the module Sterling-LWB5 with the evaluation board STM32H723. I removed the FTDI chip from the Laird module and connect UART (RX/TX/RTS/CTS) directly to the STM32.

I take example from Connectivity-STM32\1.4.0\Projects\STM32H747I-DISCO\Applications\ble_hello_sensor\CM7\Core. My main:

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_DMA_Init();
  MX_USART2_UART_Init();
  MX_RNG_Init();
  MX_USART3_UART_Init();
  MX_MBEDTLS_Init();
  MX_LPTIM1_Init();
  /* Call PreOsInit function */
  MX_MBEDTLS_Init();
  /* USER CODE BEGIN 2 */
  /* PAL init */
  stm32_cypal_bt_init(&huart2, &hlptim1);

  /* configure BLE Platform */
  cybt_platform_config_init(&bt_platform_cfg_settings);

  /* Start BLE application */
  application_start();

  /* USER CODE END 2 */

  /* Init scheduler */
  osKernelInitialize();

  /* USER CODE BEGIN RTOS_MUTEX */
  /* add mutexes, ... */
  /* USER CODE END RTOS_MUTEX */

  /* USER CODE BEGIN RTOS_SEMAPHORES */
  /* add semaphores, ... */
  /* USER CODE END RTOS_SEMAPHORES */

  /* USER CODE BEGIN RTOS_TIMERS */
  /* start timers, add new ones, ... */
  /* USER CODE END RTOS_TIMERS */

  /* USER CODE BEGIN RTOS_QUEUES */
  /* add queues, ... */
  /* USER CODE END RTOS_QUEUES */

  /* Create the thread(s) */
  /* creation of defaultTask */
  defaultTaskHandle = osThreadNew(MainTask, NULL, &defaultTask_attributes);

  /* creation of WiFi_Task */
  //WiFi_TaskHandle = osThreadNew(WiFiTask, NULL, &WiFi_Task_attributes);

  /* USER CODE BEGIN RTOS_THREADS */
  /* add threads, ... */
  /* USER CODE END RTOS_THREADS */

  /* USER CODE BEGIN RTOS_EVENTS */
  /* add events, ... */
  /* USER CODE END RTOS_EVENTS */

  /* Start scheduler */
  osKernelStart();

I have this in logs

[0] Hello Sensor Start
[0] wiced_bt_stack_init()
[32] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[37] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[42] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[47] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[53] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[58] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[64] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[69] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[75] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[80] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[85] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[90] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[96] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[101] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[107] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[112] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[118] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[123] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[129] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[134] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[140] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[145] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[151] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[156] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[162] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[167] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[173] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[178] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[184] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[189] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[195] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[200] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[206] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[211] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[217] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[222] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[228] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[233] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[238] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[244] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[249] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[255] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[260] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[266] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[271] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[277] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[282] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[287] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[293] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[298] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[304] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[309] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[315] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[320] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[326] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[331] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[337] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[342] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[348] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[353] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[359] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[364] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[370] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[375] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[381] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[386] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[392] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[397] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[403] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[408] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[414] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[419] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[425] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[430] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[436] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[441] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[447] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[452] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[458] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[463] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[469] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[474] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[479] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[485] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[490] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[496] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[501] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[507] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[512] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[518] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[523] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[528] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[534] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[539] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[545] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[550] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[556] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[561] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[567] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[572] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[578] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[583] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[589] send_msg_to_hci_tx_task(): send failure (0x60e0002)
[594] send_cmd_to_lower(): Send hci_tx queue failed (ret = 0xc1)
[600] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 100%, cri: 50%)
[610] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 96%, cri: 50%)
[663] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 96%, cri: 50%)
[678] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 93%, cri: 50%)
[694] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 90%, cri: 50%)
[709] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 87%, cri: 50%)
[725] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 84%, cri: 50%)
[740] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 81%, cri: 50%)
[756] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 78%, cri: 50%)
[771] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 75%, cri: 50%)
[787] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 71%, cri: 50%)
[803] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 68%, cri: 50%)
[818] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 65%, cri: 50%)
[834] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 62%, cri: 50%)
[849] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 59%, cri: 50%)
[865] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 56%, cri: 50%)
[880] cybt_check_and_resume_hci_tx(): Blocked, TX heap (now: 0%, cri: 50%), queue (now: 53%, cri: 50%)
[896] cybt_check_and_resume_hci_tx(): Resume hci tx. TX heap (0% < 50%), queue (50% < 50%)
[904] cybt_check_and_resume_hci_tx(): send HCI command
THANKS!
jbiemar commented 1 year ago

In the STM32 connectivity expansion pack user guide I saw:

Bluetooth® LE examples with the CYW4373 STERLING-LWB5 plus module will fail to connect if the Bluetooth® LE host is using the LE 2M PHY.

But I don't find where I can change that.

npal-cy commented 1 year ago

Hi @jbiemar,

Could you double check that UART callback is enabled in STM32cubeMX? image

Regards, Nazar