Hello,
I'm using NCS 1.4.99 with a nRF5340DK and want to use the hardware CS of the SPI and also use BLE.
Here is a simple code that work on a nRF5340PDK but only work on a nRF5340DK when CONFIG_BT is not defined.

.
Hello,
I'm using NCS 1.4.99 with a nRF5340DK and want to use the hardware CS of the SPI and also use BLE.
Here is a simple code that work on a nRF5340PDK but only work on a nRF5340DK when CONFIG_BT is not defined.

.
Hi,
I tested your code and I see that the CS pin toggles as expected when CONFIG_BT is set to n but not when set to y. I am not able to explain this right now though so I need to get back to you tomorrow.
Edit: I just noticed that this issue only occurs when building for secure mode (nrf5340dk_nrf5340_cpuapp). Building for non-secure (nrf5340dk_nrf5340_cpuappns) CS works as expected.
Thanks for this information but what do I need to do to run it in non-secure ?
I have tried with SES to build it for non-secure but it crash when calling nrfx_spim_init().
After that, I saw that SPM was not listing SPIM4 to the console, so i use SPIM3 because it was listed. Now my code get stuck in nrfx_spim_xfer() waiting for NRF_SPIM_EVENT_END that never come.
Hi,
To build for non-secure mode you select nrf5340dk_nrf5340_cpuappns as the board instead of nrf5340dk_nrf5340_cpuapp. But for this issue in general I do not yet understand what causes this nor do I have any other proposed fix at this point. I will look more into it, though.
Thanks, it's what I did but I got the problems described in my previous message.
Hi,
The actual issue here is that P1.1 (33) is used by the network core. So the fix is to use another pin. I have tested with P1.3, and with that it works as expected with both secure and non-secure, using both west on the command line and SES.
Thank you, instead I have reconfigured the P1.1 to be used by the application core.
When using the HCI RPMsg, for what function is this UART used ? Is there a documentation about it ?
I saw that pins are configure to be used by the network core in the function remoteproc_mgr_config(). Why isn't there a way to desactivate this function with prj.conf ?
Thank you, instead I have reconfigured the P1.1 to be used by the application core.
When using the HCI RPMsg, for what function is this UART used ? Is there a documentation about it ?
I saw that pins are configure to be used by the network core in the function remoteproc_mgr_config(). Why isn't there a way to desactivate this function with prj.conf ?
Hi,
Nicolas Brunner said:HCI RPMsg, for what function is this UART used ? Is there a documentation about it ?
It is used for logging. It is not explicitly documented in that example, but logging is enabled by default. You can disable it by setting CONFIG_LOG=n in hci_rpmsg's prj.conf.
Nicolas Brunner said:I saw that pins are configure to be used by the network core in the function remoteproc_mgr_config(). Why isn't there a way to desactivate this function with prj.conf ?
Calling of remoteproc_mgr_config() among other things is configured via CONFIG_TRUSTED_EXECUTION_NONSECURE, but there is no way to disable configuration of just the UART pins via prj.conf out of the box. I agree that would make sense though, if you do not want UART logging from the network core.