You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/03/17 12:35:42 UTC
[mynewt-core] branch master updated (d02c6be -> b7a755b)
This is an automated email from the ASF dual-hosted git repository.
andk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.
from d02c6be Ambiq Apollo3 BSP/MCU Port
new aea7832 hw/bsp: Update syscfg for new HCI transport
new f194570 hw/ipc_nrf5340: Add support for HCI transport flow control
new 2905633 hw/bsp: Add BLE_TRANSPORT_NETCORE to nRF53 and CMAC
new b7a755b apps: Fix settings for new HCI transport
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
apps/bleprph_oic/syscfg.yml | 4 +-
hw/bsp/dialog_cmac/syscfg.yml | 10 ++++-
hw/bsp/dialog_da14695-dk-usb/syscfg.yml | 3 +-
hw/bsp/dialog_da1469x-dk-pro/syscfg.yml | 3 +-
hw/bsp/nordic_pca10095/syscfg.yml | 6 +--
hw/bsp/nordic_pca10095_net/syscfg.yml | 7 +++-
.../include/ipc_nrf5340/ipc_nrf5340_priv.h | 3 ++
hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c | 45 ++++++++++++++++++++++
8 files changed, 70 insertions(+), 11 deletions(-)
[mynewt-core] 03/04: hw/bsp: Add BLE_TRANSPORT_NETCORE to nRF53 and CMAC
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 29056339577d5cd8fd3645e06a37575b940d3fb6
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Mar 14 10:14:29 2022 +0100
hw/bsp: Add BLE_TRANSPORT_NETCORE to nRF53 and CMAC
BLE_TRANSPORT_NETCORE is defined so we can add some configuration while
building specifically on netcore, e.g. selecting default transport for
blehci.
---
hw/bsp/dialog_cmac/syscfg.yml | 4 +++-
hw/bsp/nordic_pca10095_net/syscfg.yml | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/bsp/dialog_cmac/syscfg.yml b/hw/bsp/dialog_cmac/syscfg.yml
index 01c10bb..76d6be2 100644
--- a/hw/bsp/dialog_cmac/syscfg.yml
+++ b/hw/bsp/dialog_cmac/syscfg.yml
@@ -17,11 +17,13 @@
# under the License.
#
+syscfg.defs:
+ BLE_TRANSPORT_NETCORE: 1
+
syscfg.vals:
MSYS_1_BLOCK_SIZE: 308
OS_CPUTIME_FREQ: 31250
BLE_TRANSPORT_HS: dialog_cmac
- BLE_TRANSPORT_LL: native
# CMAC can only run NimBLE controller
syscfg.restrictions:
diff --git a/hw/bsp/nordic_pca10095_net/syscfg.yml b/hw/bsp/nordic_pca10095_net/syscfg.yml
index b2abdc3..f891667 100644
--- a/hw/bsp/nordic_pca10095_net/syscfg.yml
+++ b/hw/bsp/nordic_pca10095_net/syscfg.yml
@@ -17,6 +17,8 @@
#
syscfg.defs:
+ BLE_TRANSPORT_NETCORE: 1
+
BSP_NRF5340_NET:
description: 'Set to indicate that BSP has NRF5340 NET'
value: 1
[mynewt-core] 04/04: apps: Fix settings for new HCI transport
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit b7a755bafe5bedf932dea58c0510d6b532d80c58
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Thu Mar 17 12:37:18 2022 +0100
apps: Fix settings for new HCI transport
---
apps/bleprph_oic/syscfg.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/bleprph_oic/syscfg.yml b/apps/bleprph_oic/syscfg.yml
index 09360c0..fb8bf4c 100644
--- a/apps/bleprph_oic/syscfg.yml
+++ b/apps/bleprph_oic/syscfg.yml
@@ -29,8 +29,8 @@ syscfg.vals:
LOG_LEVEL: 0
BLE_GATT_WRITE_MAX_ATTRS: 6
- BLE_HCI_EVT_HI_BUF_COUNT: 4
- BLE_HCI_EVT_LO_BUF_COUNT: 3
+ BLE_TRANSPORT_EVT_COUNT: 4
+ BLE_TRANSPORT_EVT_DISCARDABLE_COUNT: 3
# Disable central and observer roles.
BLE_ROLE_BROADCASTER: 1
[mynewt-core] 01/04: hw/bsp: Update syscfg for new HCI transport
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit aea783267704392c55da60ffeab3915faea5317c
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Tue Mar 8 07:34:35 2022 +0100
hw/bsp: Update syscfg for new HCI transport
---
hw/bsp/dialog_cmac/syscfg.yml | 8 ++++++--
hw/bsp/dialog_da14695-dk-usb/syscfg.yml | 3 ++-
hw/bsp/dialog_da1469x-dk-pro/syscfg.yml | 3 ++-
hw/bsp/nordic_pca10095/syscfg.yml | 6 +++---
hw/bsp/nordic_pca10095_net/syscfg.yml | 5 +++--
5 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/hw/bsp/dialog_cmac/syscfg.yml b/hw/bsp/dialog_cmac/syscfg.yml
index 91c0408..01c10bb 100644
--- a/hw/bsp/dialog_cmac/syscfg.yml
+++ b/hw/bsp/dialog_cmac/syscfg.yml
@@ -20,7 +20,11 @@
syscfg.vals:
MSYS_1_BLOCK_SIZE: 308
OS_CPUTIME_FREQ: 31250
- BLE_HCI_TRANSPORT: dialog_cmac
+ BLE_TRANSPORT_HS: dialog_cmac
+ BLE_TRANSPORT_LL: native
+# CMAC can only run NimBLE controller
syscfg.restrictions:
- - BLE_HCI_TRANSPORT == "dialog_cmac"
+ - BLE_TRANSPORT
+ - BLE_TRANSPORT_HS == "dialog_cmac"
+ - BLE_TRANSPORT_LL == "native"
diff --git a/hw/bsp/dialog_da14695-dk-usb/syscfg.yml b/hw/bsp/dialog_da14695-dk-usb/syscfg.yml
index 9b3e7b4..8179775 100644
--- a/hw/bsp/dialog_da14695-dk-usb/syscfg.yml
+++ b/hw/bsp/dialog_da14695-dk-usb/syscfg.yml
@@ -76,5 +76,6 @@ syscfg.vals:
NFFS_FLASH_AREA: FLASH_AREA_NFFS
COREDUMP_FLASH_AREA: FLASH_AREA_IMAGE_1
-syscfg.vals.'BLE_HCI_TRANSPORT == "dialog_cmac"':
+syscfg.vals.BLE_TRANSPORT:
+ BLE_TRANSPORT_LL: dialog_cmac
TRNG: 1
diff --git a/hw/bsp/dialog_da1469x-dk-pro/syscfg.yml b/hw/bsp/dialog_da1469x-dk-pro/syscfg.yml
index 4ce112f..42d3046 100644
--- a/hw/bsp/dialog_da1469x-dk-pro/syscfg.yml
+++ b/hw/bsp/dialog_da1469x-dk-pro/syscfg.yml
@@ -86,5 +86,6 @@ syscfg.vals:
NFFS_FLASH_AREA: FLASH_AREA_NFFS
COREDUMP_FLASH_AREA: FLASH_AREA_IMAGE_1
-syscfg.vals.'BLE_HCI_TRANSPORT == "dialog_cmac"':
+syscfg.vals.BLE_TRANSPORT:
+ BLE_TRANSPORT_LL: dialog_cmac
TRNG: 1
diff --git a/hw/bsp/nordic_pca10095/syscfg.yml b/hw/bsp/nordic_pca10095/syscfg.yml
index 6a7776f..d0b2876 100644
--- a/hw/bsp/nordic_pca10095/syscfg.yml
+++ b/hw/bsp/nordic_pca10095/syscfg.yml
@@ -70,8 +70,6 @@ syscfg.vals:
# Always use non-blocking API
SPI_HAL_USE_NOBLOCK: 1
- BLE_HCI_TRANSPORT: nrf5340
-
QSPI_FLASH_SECTOR_SIZE: 4096
QSPI_FLASH_SECTOR_COUNT: 2048
QSPI_PIN_CS: 18
@@ -98,9 +96,11 @@ syscfg.vals.!BOOT_LOADER:
MCU_LFCLK_XO_INTCAP: c9pf
syscfg.vals.BLE_HOST:
- BLE_HCI_TRANSPORT: nrf5340
BLE_HS_FLOW_CTRL: 1
+syscfg.vals.BLE_TRANSPORT:
+ BLE_TRANSPORT_LL: nrf5340
+
syscfg.vals.BSP_NRF5340_NET_ENABLE:
BSP_NRF5340_NET_FLASH_ENABLE: 1
BLE_HCI_VS: 1
diff --git a/hw/bsp/nordic_pca10095_net/syscfg.yml b/hw/bsp/nordic_pca10095_net/syscfg.yml
index cf19e16..b2abdc3 100644
--- a/hw/bsp/nordic_pca10095_net/syscfg.yml
+++ b/hw/bsp/nordic_pca10095_net/syscfg.yml
@@ -67,6 +67,7 @@ syscfg.vals.BLE_CONTROLLER:
OS_CPUTIME_FREQ: 32768
OS_CPUTIME_TIMER_NUM: 3
BLE_LL_RFMGMT_ENABLE_TIME: 1500
-
- BLE_HCI_TRANSPORT: nrf5340
BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL: 1
+
+syscfg.vals.BLE_TRANSPORT:
+ BLE_TRANSPORT_HS: nrf5340
[mynewt-core] 02/04: hw/ipc_nrf5340: Add support for HCI transport flow control
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit f194570f32220b53fed361711f63b2601bc5db56
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Mar 9 22:59:40 2022 +0100
hw/ipc_nrf5340: Add support for HCI transport flow control
---
.../include/ipc_nrf5340/ipc_nrf5340_priv.h | 3 ++
hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c | 45 ++++++++++++++++++++++
2 files changed, 48 insertions(+)
diff --git a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340_priv.h b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340_priv.h
index a869a14..9fa2023 100644
--- a/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340_priv.h
+++ b/hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340_priv.h
@@ -46,6 +46,9 @@ struct ipc_shared {
APP_AND_NET_RUNNING,
NET_RESTARTED,
} ipc_state;
+#if MYNEWT_VAL(BLE_TRANSPORT_INT_FLOW_CTL)
+ uint8_t acl_from_ll_count;
+#endif
};
#ifdef __cplusplus
diff --git a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
index 8eb741f..9168dd4 100644
--- a/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
+++ b/hw/drivers/ipc_nrf5340/src/ipc_nrf5340.c
@@ -25,6 +25,9 @@
#include <hal/hal_gpio.h>
#include <bsp.h>
#include <nrf_mutex.h>
+#if MYNEWT_VAL(BLE_TRANSPORT_INT_FLOW_CTL)
+#include <nimble/transport.h>
+#endif
#if MYNEWT_VAL(IPC_NRF5340_NET_GPIO)
#include <mcu/nrf5340_hal.h>
@@ -268,6 +271,10 @@ ipc_nrf5340_init(void)
ipc_shared->ipc_shms = shms;
ipc_shared->ipc_state = APP_WAITS_FOR_NET;
+#if MYNEWT_VAL(BLE_TRANSPORT_INT_FLOW_CTL)
+ ipc_shared->acl_from_ll_count = MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_LL_COUNT);
+#endif
+
if (MYNEWT_VAL(MCU_APP_SECURE) && !MYNEWT_VAL(IPC_NRF5340_PRE_TRUSTZONE_NETCORE_BOOT)) {
/*
* When bootloader is secure and application is not all peripherals are
@@ -452,3 +459,41 @@ ipc_nrf5340_consume(int channel, uint16_t len)
return ipc_nrf5340_shm_read(&shms[channel], NULL, NULL, len);
}
+
+#if MYNEWT_VAL(BLE_TRANSPORT_INT_FLOW_CTL)
+int
+ble_transport_int_flow_ctl_get(void)
+{
+ int ret;
+
+ __asm__ volatile (".syntax unified \n"
+ "1: ldrexb r1, [%[addr]] \n"
+ " mov %[ret], r1 \n"
+ " cmp r1, #0 \n"
+ " itte ne \n"
+ " subne r2, r1, #1 \n"
+ " strexbne r1, r2, [%[addr]] \n"
+ " clrexeq \n"
+ " cmp r1, #0 \n"
+ " bne 1b \n"
+ : [ret] "=&r" (ret)
+ : [addr] "r"(&ipc_shared->acl_from_ll_count)
+ : "r1", "r2", "memory");
+
+ return ret;
+}
+
+void
+ble_transport_int_flow_ctl_put(void)
+{
+ __asm__ volatile (".syntax unified \n"
+ "1: ldrexb r1, [%[addr]] \n"
+ " add r1, r1, #1 \n"
+ " strexb r2, r1, [%[addr]] \n"
+ " cmp r2, #0 \n"
+ " bne 1b \n"
+ :
+ : [addr] "r"(&ipc_shared->acl_from_ll_count)
+ : "r1", "r2", "memory");
+}
+#endif