-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NUCLEO_F411RE]: Some BLE examples doesn't work with the X-NUCLEO BLE shield #40
Comments
@apalmieriGH While the I've found another issue regarding pin mapping of F411 and F401. In the datasheet, they are identical but they are declared differently in mbed. |
Any update for this issue? we test the BLE_HeartRate_IDB0XA1, generate the bin by compiling with online compiler, found it work well. no LED1 and SPI1 conflict issue be found as your description. But faild when use the mbed-os-example-ble-xxx. Actually we got a project by using X_NUCLEO_IDB0XA1 + STM32F401RE + mbed os 5.4, hope you guys can help to find the root cause, and fix it then. Best Regards, |
How do you test your mbed-os-example-ble-xxx? And what mbed-os-example-ble-xxx? |
Hi Jean-marc
Thanks alot for your kindly information.
I tested the Battery and HeartRate, none of them work will(the Device can not be found when adverting ) with mbed-os-5.4.0.
May I know which OS version in your Thermometer example.
And I use STM32 BLE Profiles as a test tool.
Best Regards,
Xinbai
|
Hello :-) |
Post Scriptum: If this does help others as well. The revision 5.4.2 works on Nordic nRF52DK. |
@jmjobin
Thanks a lot for your confirmation, the issue more like a SW bug in mbed-os-5.4. it's very helpful.
Best Regards,
Xinbai
|
@liuxinbai The bug described here is specific to the NUCLEO_F411RE and it's IO mapping in mbed OS. I would be surprised if the mbed OS 2 example work. On the other hand, the NUCLEO_F401RE is not impacted by this shared I/O issue. @liuxinbai @jmjobin I've found two bugs affecting the X_NUCLEO_IDB0XA1 under mbed OS 5.4:
We're working to deliver a fix to both of these issues in a timely manner. |
@pan Thank you very much, waiting for your good news. |
Ready to test it :-) |
@liuxinbai @jmjobin the problem encountered should be fixed now. |
I tested now and still not OK... But strangely the OS rev. is still 5.4.2 |
@jmjobin Could you detail your setup: compiler used, example tested, sniffer used and revision of the example, mbed OS and at shield library ? The reference to mbed OS has been updated to 5.4.2, previously these examples were using mbed os 5.4.1 and a bug has been fixed in the ST BLUENRG library. This library has been updated as well. |
@pan Using the on-line compiler and IDE. |
@pan. I do not understand you so well sorry... Will try to answer.
|
@jmjobin Thanks for your answer.
If you updated mbed os in your project then it makes sense that your revision was mbed OS 5.4.2 but these examples never referenced 5.4.2 until yesterday.
Yes you must update the ST shield library to get the fix. I hope it is clear enough. |
@pan- OK I updated the full example and it worked. I will have to reembed my main.cpp. |
@pan I am so sorry I did not noticed the 2 different "pan". Will be more careful :-) |
Nothing is wrong in mbed OS 5.4.x but configuration and manipulation of GPIOs on NUCLEO based targets is has been improved and is is now faster than before. As a side effect, it exposed that the reset procedure was not respecting the expected timings. |
Hi @pan- My env : Nucleo F091RC + IDB05A1 I downloaded this project and trying to use BLE_HEARTRATE project I made the changes suggested for nucleo boards with arduino connectors.
mbed-os-example-ble/BLE_HeartRate$ git diff
diff --git a/BLE_HeartRate/mbed_app.json b/BLE_HeartRate/mbed_app.json
index 73e8c3c..441f631 100644
--- a/BLE_HeartRate/mbed_app.json
+++ b/BLE_HeartRate/mbed_app.json
@@ -8,6 +8,11 @@
"NUCLEO_F401RE": {
"target.features_add": ["BLE"],
"target.extra_labels_add": ["ST_BLUENRG"]
+ },
+ "NUCLEO_F091RC": {
+ "target.features_add": ["BLE"],
+ "target.extra_labels_add": ["ST_BLUENRG"],
+ "target.macros_add": ["IDB0XA1_D13_PATCH"]
}
}
}
diff --git a/BLE_HeartRate/source/main.cpp b/BLE_HeartRate/source/main.cpp
index bced96e..7e3c851 100644
--- a/BLE_HeartRate/source/main.cpp
+++ b/BLE_HeartRate/source/main.cpp
@@ -20,7 +20,7 @@
#include "ble/Gap.h"
#include "ble/services/HeartRateService.h"
-DigitalOut led1(LED1, 1);
+//DigitalOut led1(LED1, 1);
const static char DEVICE_NAME[] = "HRM";
static const uint16_t uuid16_list[] = {GattService::UUID_HEART_RATE_SERVICE};
@@ -50,7 +50,7 @@ void updateSensorValue() {
void periodicCallback(void)
{
- led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */
+// led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */
if (BLE::Instance().getGapState().connected) {
eventQueue.call(updateSensorValue); I have built and flashed the bin file but my stm32 profiles application does not show list this profile. I am following the instructions here ps: I am very new to BLE related programming. |
@Binary-Nerd as you can see in the library page, the NUCLEO-F091RC is not included in the list of boards requiring the compatibility patch. |
@apalmieriGH I removed the patch and checked. Same result. I am not able to see the HeartRate profile listed on the iphone app. On the library page, it is mentioned
As i am using IDB05A1, Do i need to solder something? |
@pan- @apalmieriGH If it is supported, according to my understanding, the latest mbed-os without any changes shoul work just fine. Am i correct? |
@Binary-Nerd |
Thank you. So, I understand IDB0XA1_D13_PATCH patch is not required for F091RC. Please correct me if I understood it wrongly.
Since the patch is not required, I added the following to my json
After this, i hope no more changes are required. Testing procedure :
Once the nucleo boots up and the LED starts blinking, I am opening my stm32profiles application and scanning for the devices. I am expecting to see some heartrate profile being listed after scan. But the scan result is empty as of now. If it is working for you, I believe I am doing something wrong. I am trying to figure it out. If you see any issues with what I wrote above, kindly let me know. Thank you very much! |
@Binary-Nerd |
@apalmieriGH I tried updating the firmware of the IDB05A1 that was not working. firmware update fails with error code of 3. I will look into it later. Thanks for assistance. |
ARM Internal Ref: MBOTRIAGE-493 |
This issue can be closed based on the previous comments. Should be resolved |
Issue ARMmbed#40 has been closed, IAR is no longer supported, and the default applications described have been changed since. These issues are no longer accurate and should be removed.
Issue ARMmbed#40 is closed, ARMmbed#39 is closed as IAR is no longer supported, and the default applications described have been changed since this issue was added. These issues are no longer accurate and should be removed.
Issue ARMmbed#40 is closed, ARMmbed#39 is closed as IAR is no longer supported, and the default applications described have been changed since this issue was added. These issues are no longer accurate and should be removed.
* cmake: Remove mbed_configure_app_target() calls The CMake function `mbed_configure_app_target()` is now deprecated in Mbed OS and should not be called in the examples. * README: Remove incorrect Known Issues section Issue #40 is closed, #39 is closed as IAR is no longer supported, and the default applications described have been changed since this issue was added. These issues are no longer accurate and should be removed. * README: Fix grammar and markdown style * README: Add CLI 2 instructions
The cause of the failure is the use of an LED and the SPI1 in the same application. Even if the board define 4 LED, only 1 LED is actually accessible to the programmer and the LED line is shared with the clock line of the SPI1. Using both at the same time will cause failure regarding SPI communication and in this case prevent the application to actually work.
The text was updated successfully, but these errors were encountered: