-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
applications: nrf5340_audio: LED module for kits with other LED setup #20483
base: main
Are you sure you want to change the base?
applications: nrf5340_audio: LED module for kits with other LED setup #20483
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 3cd0f2152a5bcf3e246d8a4861c5777fc419ea39 more detailssdk-nrf:
Github labels
List of changed files detected by CI (30)
Outputs:ToolchainVersion: 4ffa2202d5 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
You can find the documentation preview for this PR at this link. Note: This comment is automatically posted by the Documentation Publish GitHub Action. |
applications/nrf5340_audio/boards/nrf5340_audio_dk_nrf5340_cpuapp.overlay
Show resolved
Hide resolved
applications/nrf5340_audio/boards/nrf5340_audio_dk_nrf5340_cpuapp.overlay
Show resolved
Hide resolved
/** @brief List of buttons and associated metadata | ||
*/ | ||
enum button_pin_names { | ||
BUTTON_VOLUME_DOWN = DT_GPIO_PIN(DT_ALIAS(sw0), gpios), | ||
BUTTON_VOLUME_UP = DT_GPIO_PIN(DT_ALIAS(sw1), gpios), | ||
BUTTON_PLAY_PAUSE = DT_GPIO_PIN(DT_ALIAS(sw2), gpios), | ||
#if defined(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP) |
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.
use DT macros to check if node exists
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.
not addressed
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.
Merged in the button PR so as to sort this.
@@ -52,6 +52,7 @@ const static struct btn_config btn_cfg[] = { | |||
.btn_pin = BUTTON_PLAY_PAUSE, | |||
.btn_cfg_mask = DT_GPIO_FLAGS(DT_ALIAS(sw2), gpios), | |||
}, | |||
#if defined(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP) |
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.
as above
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.
as above
|
||
#include <zephyr/logging/log.h> | ||
LOG_MODULE_REGISTER(led, CONFIG_MODULE_LED_LOG_LEVEL); | ||
LOG_MODULE_REGISTER(led, 4); /* CONFIG_MODULE_LED_LOG_LEVEL); */ |
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.
no
* | ||
* @return 0 if successful, error otherwise. | ||
*/ | ||
int board_init(void); |
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.
do not name function with board_* likewise with Kconfigs, that is reserved for actual boards files in the boards folder not applications
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.
changed to audio_nrf5340_dk_*
#ifndef _BOARD_H_ | ||
#define _BOARD_H_ |
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.
same here
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.
As above.
cc4d61d
to
7fb59b9
Compare
After documentation is built, you will find the preview for this PR here. |
7fb59b9
to
1e62820
Compare
After documentation is built, you will find the preview for this PR here. |
6617c47
to
0c343b6
Compare
applications/nrf5340_audio/boards/nrf5340_audio_dk_nrf5340_cpuapp_fota.overlay
Show resolved
Hide resolved
applications/nrf5340_audio/boards/nrf5340dk_nrf5340_cpuapp.conf
Outdated
Show resolved
Hide resolved
applications/nrf5340_audio/boards/nrf5340_audio_dk_nrf5340_cpuapp.overlay
Show resolved
Hide resolved
You can find the documentation preview for this PR here. Preview links for modified nRF Connect SDK documents: https://ncsdoc.z6.web.core.windows.net/PR-20483/nrf/applications/nrf5340_audio/doc/building.html |
29d5d74
to
7929b99
Compare
54eaf1b
to
27b99ac
Compare
7f1fe4e
to
7ef56ad
Compare
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.
There should be no reference to the nRF5340 DK until the https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/requirements.html mentions the nRF5340 DK as supported platform and all of the applications have been fully updated to support the nRF5340 DK.
For Doxygen group assigments, please see https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/dev_model_and_contributions/documentation/styleguide.html#file_headers_and_groups
| **POWER** | Turns the development kit on or off. | All | Y | Y | | ||
+-------------------+-------------------------------------------------------------------------------------+---------------------------------------+------------------+------------+ | ||
| **DEBUG ENABLE** | Turns on or off power for debug features. | All | Y | N | |
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.
https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/requirements.html are not mentioning the nRF5340 DK as supported platform for the audio applications, so you cannot add mentions of the nRF5340 DK to the docs until that page is updated. This is because the documentation will become inconsistent and confusing to users.
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.
Added nRF5340 DK as a supported platform.
+---------------+-----------------------------------------------------------------------------------------------------------+---------------------------------------------+-------------------------------+ | ||
| Button | Function | Applications | Development Kit | | ||
| | | +------------------+------------+ | ||
| | | | nRF5340 Audio DK | nRF5340 DK | |
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.
This addition is not matching the list of supported boards in Requirements.
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.
As above.
+--------------------------+-----------------------------------------------------------------------------------------------------------+---------------------------------------------+-------------------------------+ | ||
| LED |Indication | Applications | Development Kit | | ||
| | | +------------------+------------+ | ||
| | | | nRF5340 Audio DK | nRF5340 DK | |
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.
Same comment as above.
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.
As above.
#define _LED_ASSIGNMENTS_H_ | ||
|
||
#include <zephyr/devicetree.h> | ||
#include <stdint.h> |
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.
Doxygen group assignment is missing.
#ifndef _NRF5340_BOARD_H_ | ||
#define _NRF5340_BOARD_H_ | ||
|
||
/** |
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.
Doxygen group assignment is missing.
|
||
#include "board.h" | ||
#include "nrf5340_dk.h" | ||
|
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.
Same as above: doxygen group assignment is missing.
7ef56ad
to
de8b1ca
Compare
d558ad2
to
56cb9fe
Compare
@@ -8,6 +8,7 @@ menu "Drivers" | |||
|
|||
menuconfig NRF5340_AUDIO_CS47L63_DRIVER | |||
bool "CS47L63 HW codec driver" | |||
default n |
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.
default n |
@@ -20,6 +20,7 @@ config AUDIO_SYNC_TIMER_USES_RTC | |||
#----------------------------------------------------------------------------# | |||
menuconfig NRF5340_AUDIO_POWER_MEASUREMENT | |||
bool "Power measurement" | |||
default n |
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.
default n |
@@ -146,6 +147,7 @@ endmenu # Zbus | |||
#----------------------------------------------------------------------------# | |||
config NRF5340_AUDIO_SD_CARD_MODULE | |||
bool "Audio SD Card Module" | |||
default n |
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.
default n |
/** @brief List of buttons and associated metadata | ||
*/ | ||
enum button_pin_names { | ||
BUTTON_VOLUME_DOWN = DT_GPIO_PIN(DT_ALIAS(sw0), gpios), | ||
BUTTON_VOLUME_UP = DT_GPIO_PIN(DT_ALIAS(sw1), gpios), | ||
BUTTON_PLAY_PAUSE = DT_GPIO_PIN(DT_ALIAS(sw2), gpios), | ||
#if defined(CONFIG_BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP) |
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.
not addressed
applications/nrf5340_audio/boards/nrf5340_audio_dk_nrf5340_cpuapp.overlay
Show resolved
Hide resolved
1fbc5f5
to
ace34ce
Compare
bd4db70
to
a2dd41b
Compare
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.
Thanks for adding the doxygen groups. I will check with @koffes on other channels if we want to publish the APIs for the apps somewhere. Until then, I consider the API doc updates complete.
Question remains about the update to sample.yaml for the nRF5340 DK that is not included in the doc preview. @gmarull , would you know if the preview needs to be purged and the doc build triggered again for the .. table-from-sample-yaml::
tag to pull the new entry in sample.yaml.platform_allow
?
.. table-from-rows:: /includes/sample_board_rows.txt | ||
:header: heading | ||
:rows: nrf5340_audio_dk_nrf5340 | ||
.. table-from-sample-yaml:: |
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.
This does not seem to work to include nRF5340 or the preview build for docs has gotten stale...
*/ | ||
|
||
/** @file | ||
* @brief Board initialiszation function |
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.
* @brief Board initialiszation function | |
* @brief Board initialization function |
applications/nrf5340_audio/boards/nrf5340_audio_dk_nrf5340_cpuapp_fota.overlay
Show resolved
Hide resolved
| | | +------------------+------------+ | ||
| | | | nRF5340 Audio DK | nRF5340 DK | | ||
+===============+===========================================================================================================+=============================================+==================+============+ | ||
| **VOL-** | Long-pressed during startup: Changes the headset to the left channel one. | * :ref:`nrf53_audio_broadcast_sink_app` | Y | Y | |
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.
How do you want this to look @greg-fer: Now the buttons are in the leftmost column. We could delete that column all together and put the button names in the two rightmost columns.
+--------------------------+-----------------------------------------------------------------------------------------------------------+---------------------------------------------+------------------+------------+ | ||
| **LED3** | Blinking green - The nRF5340 application core is running. | All | Y | Y | | ||
+--------------------------+-----------------------------------------------------------------------------------------------------------+---------------------------------------------+------------------+------------+ | ||
| **LED5** | Off - No PC connection available. | All | N | Y | |
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.
This LED also exists on the 5340 DK. Discuss as above if we should write "IFMCU" in the Audio DK column and "LED5" in the vanilla DK column.
Also, this info is not that crucial. @greg-fer, do we usually document this IFMCU/Segger behavior on each DK?
| | Solid yellow - External hardware codec selected. | | | | | ||
| | This LED turns solid yellow also when the devices are reset, for the time then pins are floating. | | | | | ||
+--------------------------+-----------------------------------------------------------------------------------------------------------+---------------------------------------------+------------------+------------+ | ||
| **FTDI SPI** | Off - No data is written to the hardware codec using SPI. | All | Y | N | |
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.
General: To ease readability: Do we need subrows for "y"/"n" within the same LED?
6f26f2d
to
6978c97
Compare
|
5d7cf2c
to
9ae6604
Compare
applications/nrf5340_audio/boards/nrf5340_audio_dk_nrf5340_cpuapp_fota.overlay
Show resolved
Hide resolved
i2s0_sleep: i2s0_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(I2S_MCK, 0, 12)>, | ||
<NRF_PSEL(I2S_SCK_M, 0, 14)>, |
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.
Check pin assignments with Rick.
The LED module is currently written in a way that’s highly dependent on all of the LEDs present on the audio DK, which prevents the application from running on the nRF5340 DK. The module must be refactored so that it can still show the state of the application with a different selection of LEDs. Currently the button handler expects kits to have five buttons - which is true for the Audio DK, but not for the nRF5340 DK. To have the audio application running on the nRF5340 DK (and other kits in the future), the handler must be refactored to not fail compilation when fewer buttons are present, and reduce the application's overall dependency on button availability. Signed-off-by: Graham Wacey <graham.wacey@nordicsemi.no>
9ae6604
to
3cd0f21
Compare
OCT-3012
The LED module is currently written in a way that’s highly dependent on all of the LEDs present n the audio DK, which prevents the application from running on the nRF5340 DK. The module must be refactored so that it can still show the state of the application with different selection of LEDs.
Currently the button handler expects kits to have five buttons - which is true for the Audio DK, but not for the nRF5340 DK. To have the audio application running on the nRF5340 DK (and other kits in the future), the handler must be refactored to not fail compilation when fewer buttons are present, and reduce the application's overall dependency on button availability.