-
Couldn't load subscription status.
- Fork 8.1k
STM32WB: Add HCI driver and enable BLE #14188
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
Conversation
|
@erwango Have you tried it with |
Yes I have tried it but didn't pay attention, I can see now that RF performance is not quite good indeed. Though, with other fw this is working correctly, so I may have messed up with SET_TX_POWER command. Let me have a check. |
|
@jfischer-phytec-iot, it should be fixed now. |
|
@erwango I tested few peripheral samples (e.g. peripheral and peripheral_sc_only). The connection was not successful, log part from peripheral sample: |
|
@jfischer-phytec-iot, I have no issue on peripheral on my side. From what I understand, you've already managed to get it working once, is that a new status? Or is this in particular conditions? |
@erwango No, none of the peripheral samples work for me. Tested with nRF Connect and bluetoothctl on linux. |
@jfischer-phytec-iot , ok. Well this is a big concern. Difference might come from the fact I use a pre mass market version. I'll get a board similar to yours and have a check. |
|
@jfischer-phytec-iot, I had a check and got things working on the nucleo version you should own (ES MB1355C-01). And peripheral is working on both ST BLE Profile and nRF Connect. I don't know what could be the issue here. |
|
@erwango How do you flash your device? I tried it over MSD support only. |
|
@jfischer-phytec-iot, yes I'm using mass storage as well. open-ocd support is upcoming but not yet available (AFAIK) |
|
@jfischer-phytec-iot , I'm sorry to say that, but would you consider having a try with stm32cube package? |
@erwango I have the package, but there is no way to build from command line? |
Using CubeMX Tool, you can generate a makefile. Though, it might not be direct. |
👍 Thanks |
40d4476 to
28e3962
Compare
|
Found the following issues, please fix and resubmit: License issuesIn most cases you do not need to do anything here, especially if the files
|
28e3962 to
f28c4fc
Compare
|
bluetoothctl and nrf app on android, both fail to connect |
Ok, I just tested it 2 hours back and was working. Also has been tested by others successfully. |
|
tested with Needs rebase. |
Library providing hci driver for host/controller communication over shared RAM Origin: ST Microelectronics License: BSD-3-Clause URL: http://www.st.com/en/embedded-software/stm32cubewb.html Commit: 1.0.0 Purpose: Shared RAM driver for STM32WB Maintained-by: External Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Implement HCI driver for STM32WB. It allows host to controller. It is based on ST library allowing communication over RAM shared bewteen chip's C-M4 and C-M0 cores. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In order to enable HCI mode in M0 firmware, enable CFG_BLE_LL_ONLY in hci lib. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
STM32WB HCI driver requires definition of 2 RAM regions to support use of 3 shared memory sections: MAPPING_TABLE, MB_MEM1 and MB_MEM2. In linker.ld, under conditions of HCI driver to be enabled, define SRAM1 and SRAM2 based on input defined in stm32wb linker. Then define the 3 sections MAPPING_TABLE, MB_MEM1 and MB_MEM Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
sram2a and sram2b where defined in the prospect of defining HCI shared memory sections from device tree. Remove them, since this is not the case anymore. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add requested configuration to enable HCI driver Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add flash driver for stm32wb Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
stm32wb55rg is a dual core SoC (M4/M0) with a radio/protocol stack running on M0 core. M0 FW starts at flash address 0x80CB000. So flash size available to zephyr is 812K instead of 1M. Configure package size to reflect this (flash size is now 812K) and update MPU setting to exclude M0 FW. From MPU point of view, we set flash size to 512K since we should chose a size being a power of 2. If we consider there will be 2 images partitions in a FOTA scheme, 512 K is beyond image-0 and hence is sufficient to cover application image. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Configure flash partitions on nucleo_wb55rg Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add HSEM for Flash access since shared between 2 cores. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
|
@nashif , rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested peripheral_sc_only and peripheral_hr
|
Hi there, |
|
Why can't I configure Bluetooth to find out who's going to direct it? Thank you, God. Have you ever met? |
|
Hi all, [01:06:01.840,000] main: Connected |
|
@mtuxpe, there's a dedicated application to trace HCI messages called monitor. |
|
@mtuxpe It's possible that the HCI driver sent an event through bt_recv_prio, when it should have sent it through bt_recv. |
|
@mtuxpe Hi. I've faces with the same issue. M0 firmware update - fixed the issue. But now i'm seeing something strange with peripheral device. For all incoming connections the peer addresses are set to FF:FF:FF:FF:FF:FF, no matter how do i configure the BLE stack. for the Central role Addrs are ok. This issue block the secure connection. |
|
@pavlohamov @mtuxpe, if you're facing a particular issue, please raise a new issue and provide details on your set up so we can look at it in details. Current PR is merged, we won't do much here. |
|
Hello All, Also, before having received your support I tried to run the default application which comes in built with the board along with ST BLE Sensor mobile application. Then I tried to write the code as per the You Tube tutorial on STM32WB55 OLT session by STMicroelectronics and after which I flashed Also I tried to boot up the Nucleo board right now as instructed in STM32WB package by: a) Add a jumper between CN7.5 (VDD) and CN7.7 (BOOT0). Yet I am getting no results and facing the same issues as mentioned above. |
|
@PoojaKatariya, this github project is dedicated to zephyr RTOS, which is not the default application delivered with the board or in Cube package. |
This series enable BLE on STM32WB.
It includes flash driver for persistent storage.
This is based on #16373