This commit provides the users a way to disconnect dynamic
interrupts. This is needed because we don't want to keep
piling up ISR/arg pairs until the number of registrable
clients is reached.
This feature is only relevant for shared and dynamic interrupts.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This works by overwriting z_isr_install()'s definition
(possible since the symbol is now weak) with our own definiton.
Whenever trying to register a new ISR/arg pair, z_isr_install()
will check to see if the interrupt line is already in use. If it's
not then it will not share the interrupt and will work exactly
as the old z_isr_install(), meaning it will just write the new
ISR/arg pair to _sw_isr_table.
If the interrupt line is already being used by an ISR/arg pair
then that line will become shared, meaning we'll overwrite
_sw_isr_table with our own (z_shared_isr, z_shared_sw_isr_table[irq])
pair.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Since the shared IRQ code will also use the same logic to compute
the _sw_isr_table index, move the computing logic to a separate
function: z_get_sw_isr_table_idx(), which can be used by other
modules.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This commit introduces all the necessary changes for
enabling the usage of shared interrupts.
This works by using a second interrupt table: _shared_sw_isr_table
which keeps track of all of the ISR/arg pairs sharing the same
interrupt line. Whenever a second ISR/arg pair is registered
on the same interrupt line using IRQ_CONNECT(), the entry in
_sw_isr_table will be overwriten by a
(shared_isr, _shared_sw_isr_table[irq]) pair. In turn, shared_isr()
will invoke all of the ISR/arg pairs registered on the same
interrupt line.
This feature only works statically, meaning you can only make use
of shared interrupts using IRQ_CONNECT(). Attempting to dynamically
register a ISR/arg pair will overwrite the hijacked _sw_isr_table
entry.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Even though it was leading to the same result, the function should use
its parameter and not the global variable for desired frames.
Signed-off-by: Martin Jäger <martin@libre.solar>
Add a test to check error codes if attempting to use ISO-TP with CAN FD
mode even though the controller supports classical CAN only.
Signed-off-by: Martin Jäger <martin@libre.solar>
Allow existing tests to run with CAN-FD.
Add new CAN-FD specific tests.
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Signed-off-by: Martin Jäger <martin@libre.solar>
ISO-TP CAN-FD support can be enabled at runtime.
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Signed-off-by: Martin Jäger <martin@libre.solar>
According to https://github.com/zephyrproject-rtos/zephyr/pull/61886#issuecomment-1713302331
we need to use "must only" for models that spec states:
`If supported, ... shall be supported by the primary element and shall
not be supported by any secondary element`.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Update CFB font generator so it works with Pillow version 10. They
deprecated some methods, with no direct replacements, so the generated
fonts might be slightly different.
Signed-off-by: Jonathan Rico <jonathan@rico.live>
This adds a few words about using Picolibc without native support
from toolchain, and how to enable this behavior for toolchain.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
...when toolchain does not have native picolibc support.
Without native support, picolibc needs to be built from
the module. Disabling the prompt means this kconfig
takes on whatever default value specified, which is
to build source from module when there is no native
support.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The picolibc kconfigs were tied to ZEPHYR_TOOLCHAIN_VARIANT
and it only supported the Zephyr SDK, which is the only
toolchain having picolibc built-in at the moment. This
commit generalizes that to use TOOLCHAIN_HAS_PICOLIBC
cmake variable the same way as newlib: TOOLCHAIN_HAS_NEWLIB.
This provides the ability for other toolchains to declare
their support for picolibc.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This mirrors TOOLCHAIN_HAS_NEWLIB to picolibc so the cmake
variable TOOLCHAIN_HAS_PICOLIBC can be used in kconfig.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Update UEFI boot documentation since after commit 75cb6e6498 UEFI boot
sample was moved from hello_world app to special uefi boot test.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
A recent fix in zephyrproject-rtos/action-first-interaction/pull/5 is
now making the bot's comments on PR be actual comments, not PR
"review comments".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Support connecting different display for each SPI and I2C
at the same time.
In a case like DTS below.
```
&spi1 {
ssd1306_spi: ssd1306@0 {
compatible = "solomon,ssd1306fb";
...
};
};
&i2c0 {
ssd1306_i2c: ssd1306@3c {
compatible = "solomon,ssd1306fb";
...
};
};
```
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Determine sh1106 from the `compatibility` value instead of
the SSD1306_CONTROLLER_TYPE setting.
Change the settings in `boards/shields/ssd1306/sh1106_128x64.overlay`
to follow this change.
Remove the SSD1306_CONTROLLER_TYPE from its Kconfig.defconfig,
and set the `compatibility` to `sinowealth,sh1106`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
When multiple devices are connected, the SSD1306_REVERSE_MODE setting
cannot switch for each device.
Add an equivalent setting to the devicetree properties to replace it.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Store properties defined in dts in ssd1306_config's fields.
And replace code that uses DT_INST_PROP (0, ...) by config properties.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Rename `DT_COMPAT_ON_BUS_INTERNAL` to
`DT_HAS_COMPAT_ON_BUS_STATUS_OKAY` to make it a public DT API.
It is helpful for code that handles multiple DT_DRV_COMPAT in one file,
such as in the following cases.
```
#if (DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(some_sensor, i2c) || \
DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(another_sensor, i2c)
...
#endif
#define DT_DRV_COMPAT some_sensor
DT_INST_FOREACH_STATUS_OKAY(DEFINE_SOME_SENSOR)
#undef DT_DRV_COMPAT
#define DT_DRV_COMPAT another_sensor
DT_INST_FOREACH_STATUS_OKAY(DEFINE_ANOTHER_SENSOR)
```
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This modification frees up around ~10kB of RAM and make sample code
working again.
1) Reduced net packet size and count.
2) Increase Wi-Fi heap to avoid memory allocation failure.
3) Keep log as minimal.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Split the native tty serial driver in a top and bottom to enable using it
with embedded libCs.
Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
Add RK055HDMIPI4M specific testcase to LVGL. This allows LVGL to be
verified on the RT1170 and RT595 EVKs from NXP, which support LVGL using
this shield.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Update single phase bit in register when changing data->qdec_config.
Otherwise the changed settings has no effect.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
I spent several hours debugging a weird stack pointer corruption bug and
discovered that QEMU appears to mess up register contents when an interrupt
fires during the execution of a branch with a delay slot.
Instead of trying to fix qemu, let's just tell the compiler to not generate
code that uses the branch instructions with delay slots.
Closes: #60071
Signed-off-by: Keith Packard <keithp@keithp.com>
The Cadence I3C was not building with CONFIG_I3C_USE_IBI, this fixes
the build and will give a small code size reduction when enabled.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Configure SWO reference frequency to be the same as
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC. This should make all ST boards ready to
be used with SWO, without configuring any other devicetree property.
Tested with NUCLEO-L476RG and NUCLEO-H563ZI.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
SWO reference frequency was set based on `swo-ref-frequency` under `itm`
nodelabel or `/cpus/cpu@0/clock-frequency` property. Not all platforms
configure those.
All ST devices configure CPU frequency in `clock-frequency` under `rcc`
nodelabel. Configuring the same value for each board in
`/cpus/cpu@0/clock-frequency` would be one way to make SWO work out of the
box. There is lots of copy-pasting involved in this, which makes this very
error-prone.
Introduce Kconfig option, which will default to values configured in `itm`
or `/cpus/cpu@0`. The main advantage will be for platforms like ST, where
CPU clock frequency is already configured in another place. Thsoe could
override default value in SoC, board or any other platform specific layer.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
If a transfer happen in rapid sucession. It was possible for
the core to not be ready to accept another command. Poll on
the idle status bit until the core is ready to accept new data.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Due to a bug, after a completed transfer happen. Only the first
command response error was read. This fixes the issue so all
commands are read for if an error occurred.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>