Skip to content
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

[nrf noup] dts: nordic: LFRC settings adjustment #1883

Open
wants to merge 291 commits into
base: main
Choose a base branch
from

Conversation

karl-nordic
Copy link
Contributor

@karl-nordic karl-nordic commented Jul 11, 2024

LFRC calibration requirement:
Check temp every 4 seconds, calibrate if temp will change by 0.5 degree or more, calibrate unconditionally every 8 seconds

ajayparida and others added 30 commits July 1, 2024 10:00
…t case

For default case it should print the option character provided by user.
Extra shell_help removed as it's being called in the caller function.

Signed-off-by: Ajay Parida <[email protected]>
(cherry picked from commit 91054be)
(cherry picked from commit b7b96e7)
…Idle=0

When RxOnWhenIdle is set to False, turn the radio off
if no operation is ongoing in order to save power.

Upstream PR: zephyrproject-rtos/zephyr#73471

Signed-off-by: Eduardo Montoya <[email protected]>
(cherry picked from commit 6c602a1)
Changes twister tests and nrf samples from using legacy adv to ext adv
since this is the default for Mesh. Legacy adv is still tested in bsim.

Removes redundant test configuration testing ext adv.

Removes redundant config for ext_adv in `multi_ext_adv.conf`.

Signed-off-by: Håvard Reierstad <[email protected]>
Upstream PR: zephyrproject-rtos/zephyr#73318
(cherry picked from commit 96fa153)
…ution on nrf54h20

Add overlay file for nrf54h20.
Align code and DTS between spi_error_cases and spi_controller_peripheral.

Signed-off-by: Sebastian Głąb <[email protected]>
(cherry picked from commit 74378f3)
(cherry picked from commit c7a01cf)
Add possibility to test all four SPI modes (CPOL, CPHA).
Add possibility to test different bitrates.
Add tests that checks handling of zero length buffers on master.

Signed-off-by: Sebastian Głąb <[email protected]>
(cherry picked from commit b82946f)
(cherry picked from commit 730be85)
…I test

Rename SPI test to spi_controller_peripheral.
Remove iclusive language from that test.

Signed-off-by: Sebastian Głąb <[email protected]>
(cherry picked from commit 98d0fe4)
(cherry picked from commit d0f6309)
When channel range is configured in scan params, get the
channel count from `chan_idx` instead of taking a difference
of start and end of the channel range. The `difference` method
fails in case of 5GHz band since channels may not be consecutive
numbers.

Signed-off-by: Ravi Dondaputi <[email protected]>
(cherry picked from commit 9e38bcc)
(cherry picked from commit ccd3d27)
…nrf54h20

Add nrf54h20dk to platform allow list.
Overlay for tht target was already added.

Signed-off-by: Sebastian Głąb <[email protected]>
(cherry picked from commit 89489d6)
(cherry picked from commit 76587a4)
…args

README for this sample had references to the initial sample name/target.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 598ab6b)
(cherry picked from commit baf552c)
Clock control for MAX32690

Co-authored-by: Okan Sahin <[email protected]>
Signed-off-by: Sadik Ozer <[email protected]>
(cherry picked from commit 45df896)
(cherry picked from commit 3bb917d)
Adds 8bit support in SAADC hal.

Signed-off-by: Karol Lasończyk <[email protected]>
(cherry picked from commit 64de50f)
(cherry picked from commit d28f5a6)
Define HFXO (High Frequency Crystal Oscillator). This clock is managed
by system controller, from an application point of view it is a fixed
clock.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit b88a1f7)
(cherry picked from commit f3b3230)
Add a new binding for the AUXPLL IP found in some new Nordic SoCs, e.g.
nRF54H20.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit eaeebf1)
(cherry picked from commit fee4a22)
Define CANPLL, an AUXPLL IP instance used by the CAN IP. PLL settings
are hardcoded in SoC files, as this PLL should not be configured by the
application. It is meant to always run at 80 MHz.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 8e46f3c)
(cherry picked from commit eef7467)
So that we have access to AUXPLL HAL APIs.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit c0163e9)
(cherry picked from commit 341602d)
Add a new driver for the AUXPLL peripheral found in some new Nordic
SoCs, e.g. nRF54H20. AUXPLL is used to clock some peripherals like e.g.
CAN. Note that driver is implemented natively as Nordic HAL lacks
definitions for the AUXPLL IP, this may be changed once these become
available.

Note that usage of nrf_auxpll_config_set generates unnecessary extra
assembly code compared to the proposed API in
zephyrproject-rtos/hal_nordic#185 which
guarantees static initialization and single write access, possible in
the Zephyr context. However, current solution has been enforced until
further discussion on raw access APIs takes place.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 47e14db)
(cherry picked from commit d024a20)
This patch adds a timeout to the clock_control_on() implementation. The
reason for this timeout is to prevent system freezes when the PLL is
configured incorrectly, or, if BICR is wrong. The locking time of the
AUXPLL is <30us, however, when it starts it also starts other
dependencies which take much longer to become ready. The locking time
has been experimentally measured to be around 2ms, so a 10x bound has
been added.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 71dcbdd)
(cherry picked from commit f39156e)
…ngth is 0

can_mcan_send/can_mcan_get_message issued a message ram write/read even
when data length was 0. This caused some issues on systems where data
cache is enabled, because the cache invd/flushing calls present in the
mcan driver can fail if provided length is 0.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit e2f8f5b)
(cherry picked from commit 792c91b)
>=5.3.0 is required for proper CAN support.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 7ff30b6)
(cherry picked from commit 2452d31)
Add binding for Nordic CAN peripheral, based on the Bosch MCAN IP.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 955f720)
(cherry picked from commit b465f35)
Define CAN120 instance.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 8f27e49)
(cherry picked from commit 00fad43)
Configure CAN120 MCAN core registers as non-cachable to prevent D-Cache
from inhibiting volatile accesses to the CAN120 MCAN registers. Also
apply non-cachable attribute to the message ram region. Even though the
MCAN driver handles cache invalidation/flushing, MPU faults are still
triggered (to be investigated).

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 3731a13)
(cherry picked from commit 4f1a3a1)
So that we can configure CAN pins.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 0d4d4e7)
(cherry picked from commit b63789a)
Add driver for the Nordic CAN peripheral, based on Bosch MCAN IP.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit cdcb055)
(cherry picked from commit 3952171)
Enable canpll (required to clock CAN), and can120 instance, routed to
pins P9.4 and P9.5.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit c0b0443)
(cherry picked from commit 1fe02d9)
…ding

Zerorise the CAN frame before filling in data to ensure all data bytes are
initialized.

Fixes: #73309

Signed-off-by: Henrik Brix Andersen <[email protected]>
(cherry picked from commit fb4f67b)
(cherry picked from commit 921137f)
… not bytes

Print the raw DLC when enqueuing a CAN frame for sending, not the
corresponding number of bytes.

Fixes: #73309

Signed-off-by: Henrik Brix Andersen <[email protected]>
(cherry picked from commit 6a070ee)
(cherry picked from commit 72dede5)
Include the device name when printing received CAN frames. This improves
the user experience when working with multiple CAN controllers via the CAN
shell.

Signed-off-by: Henrik Brix Andersen <[email protected]>
(cherry picked from commit 88fb5e2)
(cherry picked from commit 7a18ea3)
…printing CAN frames

Optionally bypass the shell when printing received CAN frames in order not
to break up the line containing the frame. This allows for parsing the
printed CAN frames using Twisters pytest and console harnesses with the
cost of the shell ignoring input while the frame is being printed.

Signed-off-by: Henrik Brix Andersen <[email protected]>
(cherry picked from commit c4c6960)
(cherry picked from commit 5c5cdae)
Add test suite using python-can for testing Controller Area Network (CAN)
communication between a host PC and a device under test running Zephyr.

Signed-off-by: Henrik Brix Andersen <[email protected]>
(cherry picked from commit 127cb9e)
(cherry picked from commit c337b4c)
weeTike and others added 3 commits July 10, 2024 08:33
…on Subrating

Add Kconfigs to enable experimental subrating HCI commands.

Signed-off-by: Timothy Keys <[email protected]>
(cherry picked from commit 570c86d)

Signed-off-by: Timothy Keys <[email protected]>
Expand testing for QDEC at nrf platforms.
It uses general sensor API,
however there are also nrf driver specific assumptions.

Upstream PR: zephyrproject-rtos/zephyr#74677

Signed-off-by: Piotr Kosycarz <[email protected]>
Extend nrf pwm driver test coverage by testing invalid port number

Upstream PR: zephyrproject-rtos/zephyr#75583

Signed-off-by: Piotr Krzyzanowski <[email protected]>
@@ -24,7 +24,7 @@
lfosc-mode = "crystal";
lfosc-loadcap = <15>;

lfrc-autocalibration = <20 40 3>;
lfrc-autocalibration = <16 0.5 2>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in my opinion it should be: <16 2 2> based on:

  lfrc-autocalibration:
    type: array
    description: |
      A list of values pertaining to LFRC autocalibration settings. The prop
      is encoded as <temp-interval temp-delta interval-max-count>, where:
      - temp-interval is the temperature measurement interval in 0.25s steps
      - temp-delta is the temperature delta that should trigger a calibration
        in 0.25 degree steps
      - interval-max-count are the max number of temp-interval periods in
        between calibrations, independent of temperature changes.

and based on this PR description

@karl-nordic karl-nordic force-pushed the lfrc_periodic_calibration_settings branch from b951ae4 to c4116b2 Compare July 11, 2024 09:41
LFRC periodic calibration corrected

Signed-off-by: Karol Lisak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.