Commit Graph

332 Commits

Author SHA1 Message Date
Hao Luo
4b3565d958 drivers: pwm: Add support for Apollo510 pwm
This commit adds support for Apollo510 pwm driver

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-07-19 15:31:08 -04:00
Richard Wheatley
e81a241678 driver: pwm: create ambiq pwm driver
Restructured counter and timer.
CTimer/Timer is now parent to pwm and counter.
Created PWM driver and tied to pwm and pwm-led

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2025-07-19 15:31:08 -04:00
Krzysztof Sychla
a51d3c0f74 kernel: heap: Add allocation metadata to allocated_bytes
The allocated_bytes were missing the allocation metadata. Because of that
the sum of free_bytes and allocated_bytes doesn't remain constant after
each allocation. This convention doesn't match glibc's behavior. This
commit changes the chunksz_to_bytes function to include the metadata in the
calculation. The analysis of the mallinfo2 function from glibc has been
done in #92392 Pull Request.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
2025-07-07 10:08:58 -05:00
Yishai Jaffe
3b45feeb8b samples: fade_led: add direction per LED
Fixed a bug where that was caused because the different LEDs use the
same 'dir' variable and that caused them to eventually lose
synchronization.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-06-30 15:16:37 -05:00
Saravanan Sekar
e4ae7d0b56 samples: pwm: add the lp_mspm0g3507 to the blinky_pwm and led/pwm samples
The lp_mspm0g3507 has a red LED that can be driven by GPIO or PWM TIMA0
CH0, set maximum prescale and divider to arrive lower timer clock from
clock source. Add to the samples.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2025-06-27 10:57:05 +02:00
Saifan Rafiq
10fe120488 samples: fade_led: fix no led found error on rpi pico
Set the status of the pwm_leds node in the Raspberry Pi Pico
overlay to "okay". Without this change, the serial output shows
"PWM-based LED fade. Found 0 LEDs" and the led doesn't light up
on the Pico.

Signed-off-by: Saifan Rafiq <saifanr@gmail.com>
2025-06-20 16:25:10 +02:00
Jordan Yates
4bd7e0bc94 samples: sys_heap: extend with k_heap_array_get
Extend the sample with a demonstration of `k_heap_array_get`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-06-18 07:40:55 +02:00
Anas Nashif
d881fb334b boards: qemu_nios2: drop board definition
Remove qemu_nios2, more removals will follow.

Part of #89280

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-15 20:01:05 -04:00
Michael Hope
3fe4bcb67b boards: wch: add the ch32v006evt
The WCH CH32V006EVT is an evaluation board for the RISC-V based
CH32V006K8U6 SOC.

The board is equipped with a power LED, reset button, USB port for
power, and two user LEDs.

Add the board definition, documentation, and sample overlay.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
John Batch
2702192872 Samples: basic: blinky_pwm: Add support for cyw920829m2evk_02 board
Origin: Zephyr OS
License: Apache-2.0
URL: https://github.com/zephyrproject-rtos/zephyr/blame/main/samples/basic/fade_led/boards/cyw920829m2evk_02.overlay
commit: abca729367
Purpose: Add overlay to enable and configure PWM device on IFX
CYW920829M2EVK-02 board.

Signed-off-by: John Batch <john.batch@infineon.com>
2025-05-06 02:36:04 +02:00
Michael Hope
51209ef7ec samples: pwm: add the CH32V003EVT to the blinky_pwm and led/pwm samples
The CH32V003 has a single red LED that can be driven by GPIO or TIM2
CH1. Add to the samples.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-05 21:56:38 +02:00
Marek Matej
780bafab6a tests, samples: update esp32_devkitc board records
Update the tests using the esp32_devkitc_xxx entries.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-04-29 16:48:55 +02:00
Benjamin Cabé
776c0cab9a doc: boards: nordic: Adopt zephyr:board directives
Migrate all Nordic boards to leverage the full extent of zephyr:board
directives.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-31 22:00:02 +02:00
TOKITA Hiroshi
230280e0e9 boards: arduino: uno_r4: Add ADC, PWM, I2C, SPI, and TRNG
Add support for basic peripherals.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-21 09:51:47 +01:00
Mahesh Mahadevan
380494af38 samples: button: Enable PM Mode 3 on NXP RD_RW612
Enable testing this sample with PM Mode 3

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-03-21 09:51:38 +01:00
Martin Hoff
80f0801ef8 samples: Add silasb xg29_rb4412a to some sample.yaml with overlay
Enable to test samples on silabs xg29_rb4412a board.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-03-20 17:14:35 +01:00
Anas Nashif
78b114afba samples: hash_map: use sample identifier for samples
Use 'sample' in the identifier to mark this as a sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-15 00:35:23 +01:00
Anas Nashif
f29ae72d79 kernel: rename 'dumb' scheduler and simply call it 'simple'
Improve naming of the scheduler and call it what it is: simple. Using
'dumb' for the default scheduler algorithm in Zephyr is a bad idea.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-15 00:34:58 +01:00
Anas Nashif
895d91169e tests/samples: use integration platforms where possible
When possible, add integration_platforms to samples/tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Sylvio Alves
b39a830f0a samples: blinky: add esp32s3_supermini overlay
Add support for the supermini board to be build and run
by default.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-02-14 17:08:03 +01:00
Luca Burelli
187a8ad09b samples: fade_led: fix build error when PWM is not enabled
Some boards may define LEDs but disable them by default due to conflicts
with other peripherals. In this case, the new sample code introduced in
a5fd92b ("samples: fade_led: use all available LEDs") fails to build
with a missing symbol error.

Fix this by checking if the PWM device (the parent of the LED alias) is
enabled before using it. This implicitly discards invalid aliases.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-02-06 14:47:15 +01:00
Yishai Jaffe
a5fd92b0ab samples: fade_led: use all available LEDs
Refactored the sample code to use all available PWM LEDs

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-02-05 01:11:48 +01:00
Michał Stasiak
5b34d77d7b samples: basic: add support for nRF54H20 cpuppr PWM
Added support for nRF54H20 cpuppr PWM in blinky_pwm and
fade_led sample.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-01-31 09:38:25 +01:00
Ivan Pankratov
257d9d45ba kernel: sys_heap: stats: save heap pointers to an array during init
To request heap statistics, a pointer to a heap structure is required.
This is straightforward for a user-defined heap. However, such a pointer
is not known for heaps created by other components or libraries, like
libc. Therefore, it is not possible to calculate the total heap memory.

The proposed solution is to use an array of pointers, which is filled in
on every sys_heap_init() call. One can then iterate through it to sum up
the total memory allocated for all heaps.

The array size is configurable. The default array size is zero,
which means the feature is disabled. Any other integer greater then zero
defines the array size and enables the feature.

A list of pointers instead of an array could be another approach,
but it requeres a heap, which is not always available.

Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
2025-01-23 16:37:33 +01:00
Yishai Jaffe
899fde5763 samples: pwm: Add overlay for nucleo_l4r5zi board
Add Devicetree overlay for sample drivers/led/pwm and fix the one in
basic/blinky_pwm for nucleo_l4r5zi board to set appropriate to enable
pwdleds and set appropriate timer prescaler.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-17 09:48:40 +01:00
Nhut Nguyen
cd495936cf drivers: gpio: Add support for RZ/G3S
This adds GPIO driver for Renesas RZ/G3S.

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2024-12-12 11:12:22 +01:00
Anas Nashif
b207035851 tests: add integration_platforms and misc optimizations
Add integration_platforms to many tests that use platform_allow to
manage scope of pull_request CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-26 00:12:07 +01:00
Bill Waters
abca729367 driver: pwm: infineon: cyw920829m2evk_02 pwm
- Enable PWM for the cyw920829m2evk_02 board

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2024-10-26 03:57:41 +01:00
Arif Balik
25272ae5ed samples: button: add comment for input subsys
We wanted to redirect users who wants a debounced driver #78813

Signed-off-by: Arif Balik <arif.balik@enda.com>
2024-10-25 17:36:54 -07:00
Benjamin Cabé
a43009079f boards: st: adopt new zephyr:board directive and role
This updates the documentation of all the STM32 boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
f0ec6ada1d boards: espressif: adopt new zephyr:board directive and role
This updates the documentation of all the Espressif boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
aaccb6323f boards: bbc: adopt new zephyr:board directive and role
This updates the documentation of all the BBC boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Ayush Singh
fc034ea54b samples: blinky_pwm: Remove enabling pwm in overlay
- Since PWM config has been moved to base devicetree, it can be safely
  removed from the sample.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Benjamin Cabé
1db9b009a7 doc: samples: Adopt code-sample-category across tree
This commit uses the new .. zephyr:code-sample-category directive to
categorize code samples across the tree.
Updates existing legacy references to manually defined targets to now
use :zephyr:code-sample-category: role instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-23 12:00:00 +02:00
Michal Smola
a44e3e146d samples: pwm: Add overlay for frdm_mcxc242 board
Add Devicetree overlay for samples basic/blinky_pwm and drivers/led/pwm
for frdm_mcxc242 board to set appropriate tpm clock source and
to enable pwmleds.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-19 18:27:11 +01:00
Fabio Baltieri
2455291da8 samples: button: add a note about the input subsystem and samples
The button sample is really a gpio interrupt sample, one may easily miss
the debounced driver and think it's not provided.

Add a note in the basic button sample documentation to refer to the
input subsystem doc and sample.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-30 18:29:50 +01:00
Jordan Yates
243eb36b18 everywhere: reindent .overlay files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00
Tim Lovett
216a1d95ed boards: seeed: Add xiao_rp2040 board
Adds xiao_rp2040 board built off rpi_pico
Currently only uf2 flash supported

Signed-off-by: Tim Lovett <timo614@gmail.com>
2024-06-12 17:10:04 -05:00
Ayush Singh
3e349bf475 samples: blinky_pwm: fix overlay for beagleconnect_freedom
- Add missing flags
- Fixes https://github.com/zephyrproject-rtos/zephyr/pull/73628

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-06-07 18:08:44 +01:00
Ayush Singh
d9e2b0c707 samples: blinky_pwm: add overlay for bcf
- Add and test pwm for beagleconnect freedom

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-06-05 04:24:38 -07:00
Piotr Kosycarz
5a4fa06c67 samples: basic: fade_led: add testing base on console output
Extend automated testing on HW by veryfing console output.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-05 04:24:22 -07:00
Piotr Kosycarz
c9c9c9797f samples: basic: blinky_pwm: add testing base on console output
Extend automated testing on HW by veryfing console output.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-04 13:36:10 +02:00
Jordan Yates
23ca74b756 convert: use k_uptime_seconds
Replace usage of `k_uptime_get() / MSEC_PER_SEC` and
`k_uptime_get() / 1000` with dedicated function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Sylvio Alves
4a4d7584ff boards: rename and update esp32 related conf and overlay files
There are several esp32-based boards that its conf and overlay
files are missing proper renaming to match cpu cluster.

This also removes all _SOC_ name from files.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-23 15:36:13 +02:00
Manuel Argüelles
5d2670ac1f drivers: pwm: mcux_ftm: allow to select clock source
FTM internal counter can be clocked by one of three clock sources
independent of the module bus clock. This patch introduces a DT property
to perform the clock selection from DT.

DT sources are updated to keep the current clock selection for all boards,
with exception of ucans32k1sic board which is migrated to use system
clock by default, as this seems to be a better choice for most cases.
Some PWM LED samples require slower clock so overlays are added for
those cases.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-04-19 10:08:53 +02:00
Torsten Rasmussen
b9f3d68863 samples: tests: additional overlay and conf file adjustments
Adjustments of overlay and conf files to adjust for the MERGE removal.

The revert of MERGE requires specific overlay and conf files for boards
which relied on the MERGE feature.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-04-09 23:35:54 +02:00
Jamie McCrae
79fe21c48c Revert "sample: basic: blinky_pwm: Exclude rpi_pico w variant"
This reverts commit c47c37d3db876f168f33bb3fa8c28ef8976093b6.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-09 23:35:54 +02:00
Jamie McCrae
5308c4f2f1 Revert "samples: blinky_pwm: enable pwm_leds in rpi_pico overlay"
This reverts commit 7277cae6fa7c3d0ad567b4f1ef9007dc12e44314.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-09 23:35:54 +02:00
Jamie McCrae
96b6c0c015 Revert "boards: Raspberry Pi pico pwm led adjustment"
This reverts commit 037a3b52a49a8e26ac3ee4bdac46c72d76bc7399.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-09 23:35:54 +02:00