Disable power management for boards mec15xxevb_assy6853 and
mec1501modular_assy6885 on latency_measure test. This prevents
the SoC from sleeping which may skew the results. Also this
prevents stopping mid-test due to SoC being in sleep state,
and there are no external interrupts to wake up the SoC.
Fixes#24136
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Disable power management by setting CONFIG_SYS_POWER_MANAGEMENT=n
for this test. This is to prevent power management from
interfering with latency measurement.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
If there is an error in the CMake configuration phase (this can happen
if a script run using execute_process() fails, for instance), the
build system is incompletely generated and future attempts to run
'west build' will fail. This manifests in the following error:
Error: could not find CMAKE_PROJECT_NAME in Cache
Whenever we see that the cache exists but this variable is missing,
let's just force CMake to run again. This avoids the error in my
testing and is a bit more user friendly. I've seen multiple users
asking what to do in this situation; the answer is always "just build
it again", so we might as well do it for them.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Commit c408fa88a3 introduced changes
to the BUILD_ASSERT() macro so the MSG argument is optional.
However, in include/toolchain/common.h, the BUILD_ASSERT()
definition has not made the MSG argument as optional which results
in build errors complaing about too few arguments. Fix by adding
some dots there.
This is observed when using XCC (based on Clang 3.9).
Fixes#24008
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Sometimes you are only interested in doxygen, so need to wait 10 minutes
for everything to generate in this case. Now just do:
make doxygen
and get only the doxygen output.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace DT_I2C_._NAME macro with DT_LABEL(DT_NODELABEL()) instead. This
will allow us to remove all references to DT_I2C_._NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Replace DT_I2C_._NAME macro with DT_LABEL(DT_NODELABEL()) instead. This
will allow us to remove all references to DT_I2C_._NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Replace DT_I2C_._NAME macro with DT_LABEL(DT_NODELABEL()) instead. This
will allow us to remove all references to DT_I2C_._NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a property to the openisa,rv32m1-gpio binding that relates the GPIO
node to the pinmux PORT node.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Per instance Kconfig symbols aren't used by the rv32m1 lpspi driver
so remove the unnecessary setting of PWM_2.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.
Updated the openisa,rv32m1_vega-pinmux binding to require the label
property and updated the rv32m1.dtsi to add label properties for the
pinmux nodes.
Also update gpio_basic_api test to use DT_NODELABEL.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a helper macro that will go from a DT_DRV_INST number and return the
clock_ip_name value for that instance.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
As prep for drivers being converted to utilize DT_INST and removal of
per instance Kconfig symbols, move board pinmux.c code to utilize
DT_NODELABEL instead.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
As prep for drivers being converted to utilize DT_INST and removal of
per instance Kconfig symbols, move soc.c code to utilize DT_NODELABEL
instead.
Also rename various node labels to match the SoC docs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
In arch_irq_connect_dynamic the 'level' variable is only used on
platforms that define CONFIG_RISCV_HAS_PLIC. For the other platforms
we'll get a warning about an unused variable. Remove the need for
'level' and just call irq_get_level() where its needed to address the
issue.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
ext/hal/cmsis was moved out of the ext folder and into external modules
so we should remove the licensing exceptions noted in this document.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Don't assume in the soc level device trees that flexcomm nodes will
always be configured as spi. Instead, configure flexcomm nodes at the
board level for lpcxpresso55s69 and lpcxpresso54114 boards.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Don't assume in the soc level device trees that flexcomm nodes will
always be configured as usart. Instead, configure flexcomm nodes at the
board level for lpcxpresso55s69 and lpcxpresso54114 boards.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Don't assume in the soc level device trees that flexcomm nodes will
always be configured as i2c. Instead, configure flexcomm nodes at the
board level for lpcxpresso55s69 and lpcxpresso54114 boards.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The flexcomm peripheral on lpc socs can be configured into uart, spi,
i2c, or i2s mode. Introduce a shared device tree binding that gets
included by the more specific driver type bindings.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Static analyzer (clang-tidy) complains about too few arguments for
the BUILD_ASSERT.
There is missing second argument to BUILD_ASSERT used inside of
the K_MEM_POOL_DEFINE.
Signed-off-by: Artur Lipowski <artur.lipowski@hidglobal.com>
z_power_soc_deep_sleep() is called with interrupt locked already
so restoring BASEPRI is pointless here, as it would only allow
exceptions afterwards. The situation is complicated by the fact
that kernel/idle.c:idle() only locks interrupt without unlocking
which means the BASEBRI at entry of z_power_soc_deep_sleep() is
already set to allow exceptions only but not lower priority
interrupts like timer. So when, e.g. timer, interrupt fires,
the SoC would come out of deep sleep but the waking interrupts
are never delivered since they are masked, and idle() will try
to sleep again. And now it gets into a loop of going into deep
sleep briefly and waking up immediately and it goes on and on.
The solution is not to restore BASEPRI and simply leave it at
zero. This is a workaround as a proper fix would involve
invasion changes to the PM subsystem.
Also, _sys_pm_power_state_exit_post_ops() is not being called
when deep sleep is involved, so PRIMASK needs to be reset
after coming out of deep sleep.
Fixes#23274
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The origin for sleeping for 3ms after coming out of deep sleep
was to wait for PLL to lock so that UART would not send
garbage characters due to incorrect clock. In the deep sleep
code, it spins to wait for the PLL to lock so there is no need
to wait for 3ms in the app. So shorten it like other busy wait.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Threads are being re-used for multiple runs, so it is better to
stop the threads before reusing the variables for new threads.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit converts the `fp_sharing` tests to use the ztest framework.
In addition, this commit also introduces a behavioural change to run
the `pi` unit test separately from the `load_store` unit test, in order
to allow more manageable and diagnosable test execution.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The `fp_sharing` testsuite consists of two tests: `load_store` and
`pi`.
This commit reorganises the two tests into separate files and refactors
the common parameters into the `test_common.h` header file.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Now that the hardware identifier obtained with the hwinfo API is stored
in the correct order based on the platform, there is no longer the need
to reverse its bytes when populating the serial number in the
corresponding USB descriptor.
Fixes#24103
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The st,stm32l0-flash-controller did not have a binding, add one for it.
Also made a comment in stm32l0.dtsi that the driver doesn't currently
support this controller.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The flash at 0 is a cfi-flash and its 2 banks each that are 64M.
Update qemu-virt-a53.dtsi to reflect the proper flash config, however we
comment out the second bank of flash for now because zephyr,flash can
only handle one value in the reg property.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fix documentation in kernel_arch_data.h and kernel_arch_func.h
headers for ARM, to indicate that these are common headers for
all ARM architecture variants.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
z_isr_install is not suited to handle multi-level interrupt formats.
This update allows z_isr_install to accept irq numbers in zephyr format
and place them in the isr table appropriately.
Fixes issue #22145
Signed-off-by: Jaron Kelleher <jkelleher@fb.com>
Allow C++ code to evaluate time base conversion routines at compile time
by marking them as constexpr where possible.
Signed-off-by: Josh Gao <josh@jmgao.dev>