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 fromlist] boards: nordic: nrf9160dk: Correct board check for nrf… #1915

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

Conversation

eivindj-nordic
Copy link
Contributor

…52840_reset

With HWMv2 CONFIG_BOARD_NRF9160DK_NRF9160 is not defined when building the non-secure target, so it has to be specified.

Upstream PR: zephyrproject-rtos/zephyr#76294

57300 and others added 30 commits July 1, 2024 10:55
Each local RESETINFO instance can be used in samples.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 1f05b22)
Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit b613931)
Adds support for first possible LED to be connected with HW PWM.

Signed-off-by: Karol Lasończyk <[email protected]>
(cherry picked from commit bb4c92a)
(cherry picked from commit 49d3236)
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <[email protected]>
(cherry picked from commit e63c691)
(cherry picked from commit 0270d44)
…tion

Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <[email protected]>
(cherry picked from commit 1b3725e)
(cherry picked from commit 34f3c29)
…utput on HW

Verify host console.

Signed-off-by: Piotr Kosycarz <[email protected]>
(cherry picked from commit 45aca35)
(cherry picked from commit 184f249)
Verify host console.

Signed-off-by: Piotr Kosycarz <[email protected]>
(cherry picked from commit 3222f37)
(cherry picked from commit 172ce6d)
…nsole

Extend automated testing on HW by veryfing console output.

Signed-off-by: Piotr Kosycarz <[email protected]>
(cherry picked from commit 83958eb)
(cherry picked from commit 17c1aef)
Pins P0.06 and P0.07 are shorted on nRF5340 DKs prepared for on-target
tests because that is required for UART tests. That causes background
SPIM transfers in this sample to fail because SPIM is not able to drive
its SCK line configured as P0.06. Rearrange then the pins used in this
sample, so that SCK is not on a pin involved in a GPIO loopback.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 9c874f0)
(cherry picked from commit ff5a2d9)
…d is enabled

Change updates log level only if UART log backend is enabled in Kconfig
configuration. The log level update is not needed in case logs are
provided over other backend (e.g. RTT).

Change affects both USB stacks.

Upstream PR: zephyrproject-rtos/zephyr#74520

Signed-off-by: Marek Pieta <[email protected]>
(cherry picked from commit 9b2586b)
…ith J-Links

The nrfutil runner calls "nrfutil --json device list" which outputs
information about all connected serial ports. The list includes not only
actual boards but also any ttyACM instance. If the ttyACM instance does
not have serial number, then the nrfutil runner will fail on matching
serial number regexp on NoneType.

Fix the issue by limiting nrfutil runner board output to only devices
that have trait jlink set.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit e136f02)
(cherry picked from commit b37d891)
…lized

drivers/serial/uart_async_to_irq.c: In function 'get_rx_timeout':
drivers/serial/uart_async_to_irq.c:51:26:
warning: 'cfg.baudrate' may be used uninitialized
   51 |                 baudrate = cfg.baudrate;
      |                 ~~~~~~~~~^~~~~~~~~~~~~~
drivers/serial/uart_async_to_irq.c:45:28: note: 'cfg' declared here
   45 |         struct uart_config cfg;

Upstream PR: zephyrproject-rtos/zephyr#74530

Signed-off-by: Piotr Kosycarz <[email protected]>
(cherry picked from commit e3afae9)
In order for the --recover option to work properly on the nRF54H20, it
requires executing it for both cores, the radio and the application one.
Extend the recover_target() function so that it does so for both 53 and
54H20.

Upstream PR: zephyrproject-rtos/zephyr#74489

Signed-off-by: Carles Cufi <[email protected]>
(cherry picked from commit 1c416bf)
This is implementation of ICBMsg endpoint deregistration.
The underlying ICMsg instance and blocks are not affected by
deregistration, so it is possible to reuse the same address
during the re-registration of the same endpoint.

Upstream PR: zephyrproject-rtos/zephyr#74243

Signed-off-by: Dominik Kilian <[email protected]>
(cherry picked from commit 297b00d)
Implementation is based on the section 6.1 of the RFC 4880.

Signed-off-by: Adrien Ricciardi <[email protected]>
(cherry picked from commit 863f6af)
(cherry picked from commit 3038780)
Check CRC computation in a single step and in multiple steps.

Signed-off-by: Adrien Ricciardi <[email protected]>
(cherry picked from commit 19f645e)
(cherry picked from commit 93f6825)
This macro allows to know the size of a struct member at compile time.

Several parts of the Zephyr code are currently using directly the macro
code.

Also added a unit test.

Signed-off-by: Adrien Ricciardi <[email protected]>
(cherry picked from commit bf8b1d6)
(cherry picked from commit fcf7801)
Use the utility macro instead of bare code.

Signed-off-by: Adrien Ricciardi <[email protected]>
(cherry picked from commit 9f6451d)
(cherry picked from commit 032abb7)
…er rram

Erasing rram is very similar to partial erase on flash.
So we should use the same multiplier as there, 1.5.
0.1 multipler is way to low and was causing timeouts.

Upstream PR: zephyrproject-rtos/zephyr#74589

Signed-off-by: Martin Tverdal <[email protected]>
(cherry picked from commit 625e055cb1c24e456a6e0cca73f917708d540c45)
(cherry picked from commit ed76850)
Time it takes to "erase" one "page" of rram is too low.
Where getting timeouts.
"erase" of rram is done by writing all the words.
one "page" is 4096 bytes meaning 1024 32bit words.
worstcase time it takes to write one 32bit word from
0x00000000 to 0xffffffff is about 42us, giving 42ms
to write 1024 words.

Upstream PR: zephyrproject-rtos/zephyr#74589

Signed-off-by: Martin Tverdal <[email protected]>
(cherry picked from commit 11599b2c52da541ae1bb7c1e8c41aeddbc3aa855)
(cherry picked from commit 6d605d2)
Fixes an issue in the code that processes the output file of a
compiler to see which files should be watched, the compiler can
combine multiple files into a single line instead of putting them
each on separate lines if the length of the file paths is short,
therefore account for this and split it up into multiple elements

Upstream PR: zephyrproject-rtos/zephyr#74655

Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit 9c36c56)
Fixes and simplifies the handling of how the dts watch file is
processed

Upstream PR: zephyrproject-rtos/zephyr#74655

Signed-off-by: Grzegorz Swiderski <[email protected]>
Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit e6c7d81)
This reverts commit 33786b5.

Reverting it because the upstream PR has been abandoned, and
this extra CMake variable is causing the warning
"Manually-specified variables were not used by the project".

As of now the version warning doesn't come up.

Signed-off-by: Tomi Fontanilles <[email protected]>
(cherry picked from commit 2c57519)
(cherry picked from commit 3d2f1c7)
…to RFC2131

DHCP Request retransmission in RENEW and REBIND states was not
compliant with RFC2131.

The retransmission interval should not be calculated as in REQUESTING
state in such case, but rather calculated based on the remaining T2
or lease time (depending on current state).

RFC doesn't also mention any retransmission count limit for those
states. The client should retransmit the REQUEST until T2 or lease
expiry time are reached.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 4d4391b)
(cherry picked from commit e707cf2)
In case no Renewal/Rebinding times have been provided the server via
DHCP options, we should reset their values on ACK, so that the client
can recalculate the defaults. This is important, as the lease time may
change, so we should recalculate default T1/T2 timeout based on the new
lease time value.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 0d3a021)
(cherry picked from commit 42f4e32)
There were two errors in calculations of LFXO INTCAP code:
- The value provided by DTS files is internal desired capacitance.
  The value from DTS has to be "encoded" before use in INTCAP
  calculations formula. The formula for encoding is:
  CAPACITANCE_CODE = (<desired_value> - 4pF) / 0.5
  Subtract of 4 is related with lowest value in the allowed range.
  Division by 0.5 is related with change to steps size.
  In former code the subtration of 4pF was missing.

- The mid_val calcuation was wrong due offset_k left shift by 4.
  It should be left shift by 3 to get total left shift of 9.
  That matches the left shift of former part of the equation.
  Final integer value was calculated by right shift 10, it should
  be right shift 9. Then rounding was done by use of mod by (1 << 10)
  It should be mod by (1 << 9) and compared with (1 << 8), that is
  half of 0-512 range.

Upstream PR: zephyrproject-rtos/zephyr#74668

Signed-off-by: Piotr Pryga <[email protected]>
(cherry picked from commit 221d066)
…ng error

The implementation of formula, to calculate HFXO INTCAP code,
had a rounding error. That may lead so small deviation of HFXO
clock accuracy.

The IPS formula uses capacitance values in piko Fartd units.
That requires use of floating point data types. To avoid that
implementation of the formula uses femto Farats (1000 smaller unit).

In the former implementation conversion from femto Farad to piko Farad
was done just after reading of the desired capacitance from DTS.

To make sure the calculations are correct the change of unit must be
done at very end. Also rounding must be applied.

Also the formula was split and more comments were added to make the
implementation clear.

The commit fixes the implementation of the IPS formula.

Upstream PR: zephyrproject-rtos/zephyr#74668

Signed-off-by: Piotr Pryga <[email protected]>
(cherry picked from commit cc0c00f)
…r nRF54L

There was an error in calculation of LFXO INTCAP code that prevented
obtaining desired XTAL accuracy below 50PPM. The error was fixed
the accuracy should be within expected range.

Upstream PR: zephyrproject-rtos/zephyr#74668

Signed-off-by: Piotr Pryga <[email protected]>
(cherry picked from commit 9e770fa)
…e beacon server

Commit add extension of configuration server by private
beacon server.
Mesh Protocol v1.1 specification
4.4.11.1
The Mesh Private Beacon Server model is a main model
that extends the Configuration Server model.

Configuration server and private beacon server shall always
exist together since they have bound states.

Signed-off-by: Aleksandr Khromykh <[email protected]>
(cherry picked from commit 3e2b44a)
(cherry picked from commit ef4f383)
…rver

Commit add extension of configuration server by large
composition data server.
Mesh Protocol v1.1 specification
4.4.21.1
The Large Composition Data Server is a main model
that extends the Configuration Server model.

Signed-off-by: Aleksandr Khromykh <[email protected]>
(cherry picked from commit f9d7385)
(cherry picked from commit a5782c6)
To match used loopbacks.

Signed-off-by: Piotr Kosycarz <[email protected]>
(cherry picked from commit 456fed3)
(cherry picked from commit 6beafc1)
@eivindj-nordic eivindj-nordic force-pushed the nrf9160dk_nrf52840reset_fix_ncs branch 2 times, most recently from 818f397 to 2119755 Compare July 25, 2024 12:39
While forwarding a multicast packet decrement hop limit in a common net
buffer. Also, packets with hop limit equal to 0 should not be forwarded.

Signed-off-by: Konrad Derda <[email protected]>
(cherry picked from commit 30c38179e8998253195de58f3b8fb394cd26b092)
Change the implementation of net_ipv6_is_addr_mcast_scope() inline
function that let us check if a given IPv6 address has a specified
scope. Previously, it was comparing the whole byte including flags
of a multicast address. It meant, that while checking for a specific
scope a one was also checking the flags. Even in Zephyr's net stack
there are checks for a IPv6 link local scope that are failing for
addresses that are not marked as "well known" (when least significant
bit of the flags is set).

Signed-off-by: Konrad Derda <[email protected]>
(cherry picked from commit 6788de11878a55d3dd37a4a331a80863e34cb0d5)
jaz1-nordic and others added 17 commits July 29, 2024 13:06
…ding

Enable MSTATUS.IEN to allow RISCV interrupts for
non-multithreaded applications.

Signed-off-by: Jakub Zymelka <[email protected]>
(cherry picked from commit 502fcac)
Adapting icmsg to work without the MULTITHREADING functionality.
Dependencies for kernel work_queue, mutexes and other functions
related to running multithreaded applications have been 'ifdefed'.

Signed-off-by: Jakub Zymelka <[email protected]>

Upstream PR: zephyrproject-rtos/zephyr#73857
Removed k_sleep dependencies in non-multithreaded runs.

Signed-off-by: Jakub Zymelka <[email protected]>

Upstream PR: zephyrproject-rtos/zephyr#73857
By adding this metric, any problem with the remote core sending messages
is observable.

Signed-off-by: Celina Sophie Kalus <[email protected]>
(cherry picked from commit 9e0d4ef)
Removed k_sleep dependencies and added 'printk' instead of LOG
in non-multithreaded runs.

Signed-off-by: Jakub Zymelka <[email protected]>

Upstream PR: zephyrproject-rtos/zephyr#73857
… SYNTH test

Test was not covering nrf54l15 which had Synth source bitfield
renamed. Changing the test to use Kconfig to determine if
Synth is present.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit c026b55)
…h20 ppr

Add overlays for PPR core on nrf54h20.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit c87ab8c)
For slow processors it is possible that setting 1 ms alarm and
then canceling it could lead to alarm expiring before it is canceled
and that was not expected in the test. Increasing timeout to 1.5ms.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 331442f)
…20 ppr

Add overlays for PPR core on nrf54h20.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 4d6c059)
…uppr config

Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 407aa5c)
…20 cpuppr config

Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit a575d9b)
…to `3873c6f`.

Regular openthread upmerge to `3873c6fcd5a8a9dd01b71e8efe32ef5dc7923bb1`.

Signed-off-by: Przemyslaw Bida <[email protected]>
(cherry picked from commit 54d9fe3)
…ent.

Adds implementation of tcat advertisement API.

Signed-off-by: Przemyslaw Bida <[email protected]>
(cherry picked from commit 4c34e95)
Adding:
	- `OPENTHREAD_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`
	- `OPENTHREAD_CHANNEL_MANAGER_CSL`
	- `OPENTHREAD_PLATFORM_LOG_CRASH_DUMP`
	- `OPENTHREAD_MULTICAST_DNS`
	- `OPENTHREAD_VERHOEFF_CHECKSUM`

Signed-off-by: Przemyslaw Bida <[email protected]>
(cherry picked from commit 7dc830e)
…to `e10a925`.

Regular openthread upmerge to `e10a92570f94ff1e0bc5e0da9ecf0ee135d955a6`.

Additionally commit aligns platform implementation with diag changes:
openthread/openthread#10354

based on:
openthread/ot-nrf528xx#822

Upstream PR: zephyrproject-rtos/zephyr#75088

Signed-off-by: Maciej Baczmanski <[email protected]>
The sample must end to dump coverage data.
Stop receiving to prevent callback from interrupting coverage dump.

Upstream PR: zephyrproject-rtos/zephyr#76415

Signed-off-by: Piotr Kosycarz <[email protected]>
…52840_reset

With HWMv2 CONFIG_BOARD_NRF9160DK_NRF9160 is not defined when building
the non-secure target, so it has to be specified.

Signed-off-by: Eivind Jølsgard <[email protected]>
(cherry picked from commit 697588f)
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.