zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.48k stars 6.41k forks source link

NRF5340 PA/LNA support #24142

Closed binkboyd closed 3 years ago

binkboyd commented 4 years ago

Describe the bug When enabling PA/LNA pin control the build fails with what appears to be both GPIO and PPID related errors. It doesn't look like the NRF53 PA/LNA code is implemented yet.

To Reproduce Steps to reproduce the behavior: 1) add following to hci_rpmsg sample prj.conf, using the CONFIG_BT_CTLR=y CONFIG_BT_CTLR_GPIO_PA=y CONFIG_BT_CTLR_GPIO_PA_PIN=29 CONFIG_BT_CTLR_GPIO_LNA=y CONFIG_BT_CTLR_GPIO_LNA_PIN=24

2) west build samples/bluetooth/hci_rpmsg -b nrf5340_dk_nrf5340_cpunet 3) Fails with lots of error, but seems to be both GPIO and ppi related: ...error: 'NRF_GPIO' undeclared (first use in this function); did you mean 'NRF_GPIOTE'?

define NRF_GPIO_PA NRF_GPIO

...warning: implicit declaration of function 'hal_enable_palna_ppi_config'; did you mean 'hal_trigger_aar_ppi_config'? [-Wimplicit-function-declaration]

...error: 'HAL_ENABLE_PALNA_PPI' undeclared

Expected behavior Expected the sample to build and PA/LNA control to work.

Impact My board is not useable as I have an external amplifier which cannot be controlled by the NRF5340.

Environment (please complete the following information):

carlescufi commented 4 years ago

@anangl would you please take a look at this? It's a matter of porting the PPI to DPPI

ioannisg commented 4 years ago

Is this really a bug @carlescufi ? PA/LNA support has not been ported yet to nRF5340, so AFAIU, it has never worked, so the ticket should be labeled as feature/enhancement

carlescufi commented 4 years ago

Yep, agreed @ioannisg. Let's relabel this as hardware support

github-actions[bot] commented 4 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

github-actions[bot] commented 3 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

SloMusti commented 3 years ago

I have the same issue and would like to use this functionality.

cvinayak commented 3 years ago

@binkboyd and @SloMusti

Please try using #30950 and leave your comments here or in the PR.

Add the following to your application core MCU program, to permit the GPIO to be controlled by network core MCU.

    NRF_P0->PIN_CNF[29] =
        GPIO_PIN_CNF_MCUSEL_NetworkMCU << GPIO_PIN_CNF_MCUSEL_Pos;
    NRF_P0->PIN_CNF[24] =
        GPIO_PIN_CNF_MCUSEL_NetworkMCU << GPIO_PIN_CNF_MCUSEL_Pos;
github-actions[bot] commented 3 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.