Hello,
I tried recently the X-NUCLEO-IDB05A1 BLE shield with my Nucleo_L476RG board running some mbed example. Unfortunately, none of the examples worked for me. After a long time of debugging, it appears that it is the reset time of the shield which is the origin of the issue. Indeed, when I compared the X-NUCLEO_IDB0XA1 mbed library with the one on the STM32 Cube Expansion BLE, I saw that the library on mbed only wait 5us between reset and 505us after reset when the one on the cube wait 5ms between and after the reset. When I set this values in the mbed libray, all of the examples worked finally fine.
I just changed those lines:
X_NUCLEO_IDB0XA1 Reset Fix (BlueNRGDevice.cpp)
void BlueNRGDevice::reset(void)
{
wait_us(500);
/* Reset BlueNRG SPI interface */
rst_ = 0;
wait_us(5);
rst_ = 1;
wait_us(5);
/* Wait for the radio to come back up */
wait_us(500);
}
by :
X_NUCLEO_IDB0XA1 Reset Fix (BlueNRGDevice.cpp)
void BlueNRGDevice::reset(void)
{
/* Reset BlueNRG SPI interface */
rst_ = 0;
wait_ms(5);
rst_ = 1;
wait_ms(5);
}
Maybe you should also make this change in the repo to avoid other people to have this problem.
Note: this only happen with mbed OS 5. Strangely, the example with mbed OS 2 works fine.
Julien.
Hello,
I tried recently the X-NUCLEO-IDB05A1 BLE shield with my Nucleo_L476RG board running some mbed example. Unfortunately, none of the examples worked for me. After a long time of debugging, it appears that it is the reset time of the shield which is the origin of the issue. Indeed, when I compared the X-NUCLEO_IDB0XA1 mbed library with the one on the STM32 Cube Expansion BLE, I saw that the library on mbed only wait 5us between reset and 505us after reset when the one on the cube wait 5ms between and after the reset. When I set this values in the mbed libray, all of the examples worked finally fine.
I just changed those lines:
X_NUCLEO_IDB0XA1 Reset Fix (BlueNRGDevice.cpp)
by :
X_NUCLEO_IDB0XA1 Reset Fix (BlueNRGDevice.cpp)
Maybe you should also make this change in the repo to avoid other people to have this problem.
Note: this only happen with mbed OS 5. Strangely, the example with mbed OS 2 works fine.
Julien.