2021-02-05 07:36 AM
Hello to all,
I succesfully upload the DTM_SPI firmware on my X-NUCLEO-BNRG2A1 board, , using the SWD, but the BLE chip is no more responding. I'm using the X-NUCLEO-BNRG2A1 with a STM32L476RG-Nucleo, and I tried the "SampleAppThT" application to set up the BLE chip, but, as I said, I have no responce from it.
I updated the DTM_SPI Keil project with this specific define for the BlueNRGM2SP:
HS_SPEED_XTAL=HS_SPEED_XTAL_32MHZ,
LS_SOURCE=LS_SOURCE_INTERNAL_RO and
SMPS_INDUCTOR=SMPS_INDUCTOR_NONE, as indicated in DT0137 document. But without success.
The "SampleAppThT" program outpus is:
HWver 0, FWver 0
Setting BD_ADDR failed 0xff.
GATT_Init failed.
GAP_Init failed.
SERVER: BLE Stack Initialized
Error while adding Sample Service.
Error while adding service.
General Discoverable Mode 255
Could someone please tell me how to run DTM_SPI software for BlueNRGM2SP chip on X-NUCLEO-BNRG2A1?
Many many thanks.
Clemente
Solved! Go to Solution.
2021-02-10 01:14 AM
Hello to all,
I resolve the problem. Now the X-NUCLEO-BNRG2A1 is working again.
I use the DTM project inside the "BlueNRG-1_2 DK 3.2.1\Project\BLE_Examples\DTM\<your_IDE>\BlueNRG-2", and modify it as follow:
SPI_INTERFACE
BLE_STACK_CONFIGURATION=BLE_STACK_FULL_CONFIGURATION
BLUENRG2_DEVICE HS_SPEED_XTAL=HS_SPEED_XTAL_32MHZ
USER_BUTTON=BUTTON_1
LS_SOURCE=LS_SOURCE_INTERNAL_RO
SMPS_INDUCTOR=SMPS_INDUCTOR_NONE
--predefine=-DMEMORY_FLASH_APP_OFFSET=0x2000
After this modification I'm be able to debug the DTM software too, and the program "SampleAppInit()" works without problem.
Thanks to all.
Clemente
2021-02-08 08:16 PM
The preprocessor settings are fine.
Can you try to test with X-CUBE-BLE2 package?
2021-02-09 01:03 AM
Hello Winfred, thanks for your responce.
I upload the "SimpleApp" program from "STM32CubeExpansion_BLE2_V3.1.0" to my STM32L476RG-Nucleo, but the code get in stuck here:
void MX_BlueNRG_2_Init(void)
{
/* USER CODE BEGIN SV */
/* USER CODE END SV */
/* USER CODE BEGIN BlueNRG_2_Init_PreTreatment */
/* USER CODE END BlueNRG_2_Init_PreTreatment */
/* Initialize the peripherals and the BLE Stack */
uint8_t ret;
User_Init();
hci_init(APP_UserEvtRx, NULL);
PRINT_DBG("BlueNRG-2 BLE Sample Application\r\n");
/* Init Sample App Device */
ret = SampleAppInit();
if (ret != BLE_STATUS_SUCCESS)
{
PRINT_DBG("SampleAppInit()--> Failed 0x%02x\r\n", ret);
while(1);
}
The "SampleAppInit()" function fail.
It apper that the DTM_SPI software inside the BlueNRGM2SP chip is not running at all.
BR
Clemente
2021-02-10 01:14 AM
Hello to all,
I resolve the problem. Now the X-NUCLEO-BNRG2A1 is working again.
I use the DTM project inside the "BlueNRG-1_2 DK 3.2.1\Project\BLE_Examples\DTM\<your_IDE>\BlueNRG-2", and modify it as follow:
SPI_INTERFACE
BLE_STACK_CONFIGURATION=BLE_STACK_FULL_CONFIGURATION
BLUENRG2_DEVICE HS_SPEED_XTAL=HS_SPEED_XTAL_32MHZ
USER_BUTTON=BUTTON_1
LS_SOURCE=LS_SOURCE_INTERNAL_RO
SMPS_INDUCTOR=SMPS_INDUCTOR_NONE
--predefine=-DMEMORY_FLASH_APP_OFFSET=0x2000
After this modification I'm be able to debug the DTM software too, and the program "SampleAppInit()" works without problem.
Thanks to all.
Clemente
2021-02-16 06:27 PM
Just a note that
configurations SPI and SPI_NOUPDATER shall both work.