Disable RTC WDT enabled (by default) by 2nd stage bootloader in ESP-IDF.
This WDT timer ensures correct hand-over and startup sequence from
bootloader to application.
Enabling bootloader caused system clock initialization to fail
when clock rate is greater then 80MHz. This also fixes
esp32 clock source code.
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
-The STM32F410RB has no AHB2 bus so LL_AHB2_GRP1_EnableClock() and
LL_AHB2_GRP1_DisableClock() should not be called for this soc.
-The interrupt table had to be changed because of no OTG_FS_WKUP_IRQn
(no USB OTG at all).
Signed-off-by: Hans Unzner <hansunzner@gmail.com>
Convert the driver so that it creates its instance basing on DT.
Remove no longer needed Kconfig option CRYPTO_NRF_ECB_NAME.
Also update accordingly the crypto sample.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Since the PU power rail of i2c bus might be gone at the initial state
after ec powered up, we might have no chance to get STOP condition. This
is because no i2c transactions occurred before its power rail is
restored. But it's crucial to reset the whole i2c module after i2c bus
is back to the idle state.
The original test suite for i2c recovery mechanism didn't consider this
case that initial i2c bus is low before ec powered on. Hence, this CL
fixed this symptom by:
1. Force i2c modules must proceed 'reset' step no matter we received
STOP condition or not.
2. Use Boolean for condition check to prevent misusage and meet MISRA.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Extend the PWM API with optional API functions for capturing PWM pulse
width and period cycles.
Fixes#26026.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add support for enabling and configuring PLL3 on STM32 H7 series. PLL3
is used as a clock source by certain peripherals, e.g. LTDC.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Provide a utility function to compute PLL VCO input range so that it
can be re-used for other PLLs.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
When flash is Dualbank and flash size is lower than 512K,
then there is a discontinuity between bank1 and bank2.
Also take into account bank swap capability.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
When setting baudrate register, baudrate value is computed according
to the oversampling given value, which is default boot time
value (16).
In case oversampling value has been changed by bootloader (as in case
of TFM bootloader), a desynchronsation happens between OVR and BRR
values and the ouptut baudarate is incorrect.
For oversampling register before setting the baudrate to avoid this
situation.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
When calling irq_rx_ready or irq_tx_ready API, return the logical AND
between the irq status and the enable of that irq.
Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
In order to simplify the handling of DMA_STM32_V1/V2 and DMAMUX_STM32
symbols, set them directly based on related compatible status.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2 versions of DMA hardware blocks could be found across stm32 series.
In order to simplify the handling of matching Kconfig symbols,
make this visible in dts files by creating "st,stm32-dma-v1" and
"st,stm32-dma-v2" and set them accordingly in dtsi files.
Duplicate and update related bindings to reflect that new state.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
1. don't use "inline" in .c, let the compiler decide
2. remove superfluous parentheses
3. simplify a function by directly returning the result of a boolean
operation
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Some interrupts can be enabled by the ROM, e.g. the timer interrupt.
When then in Zephyr the interrupt controller is enabled, before
individual interrupts are configured, interrupts can arrive and lead
to the spurious interrupt handler being invoked. Fix thid by
disabling all child interrupts when configuring cAVS interrupt
controllers.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Line break on #error directive is confusing github and ending up
breaking syntax highligthing in github UI which makes me nervous
during review.
Convert error message to a one liner.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Due to clock discrepancy, busy waiting for 15us was not covering for
half tick in certain cases. Busy wait runs from HF clock source.
Increased to 19us to cover it. Anyway, this case is hit very rarely,
only when there was aborted, not-cancelled compare value that was
about to expire. Because of that, increase shall not impact the
performance.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
For historical reasons, the maximum speed of the Atmel SAM USB
controller is done by comparing the maximum-speed property string from
the DT using strncmp at runtime.
Now that the DT_ENUM_IDX macro exists, we can use it to get the
maximum-speed property at build time and without string comparison.
Unsupported speed can also be reported at build time.
Note that the default speed in case the optional maximum-speed property
isn't present in the DT is changed from full-speed to high-speed to
match the property description. This is a no-op in practice as this
properties is defined at the soc level.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
CAN_MCP2515_MAX_FILTER is not needed anymore and was probably just a
misunderstanding. Aligned it with the other CAN drivers.
This also was the last difference in the mcp2515 specific config for the
can sample, so that can be deleted as well.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
The STM32F105xx USB clock goes through a prescaler either PLL1 x2 /2
or PLL1 x2 /3, the output of this must be 48 MHz. As such, the output
of PLL1 must be 48 MHz or 72 MHz.
NOTE: This requires that the system is running from PLL1 (PLLCLK).
Support for running from PLL2 will be implemented in the future.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Set the prescaler in register BTR according to the configured bitrate in DTS.
This bug appeared in commit 8b6c1bd4b7
Signed-off-by: Julien D'Ascenzio <julien.dascenzio@paratronic.fr>
```
/home/humanentity/zephyr/drivers/ipm/ipm_handlers.c:23: undefined reference to 'z_impl_max_data_size_get'
```
The error shows when having CONFIG_BT=y and CONFIG_USERSPACE=y, and
is easily reproduced by adding
```C
CONFIG_USERSPACE=y
```
to `samples/bluetooth/peripheral/prj.conf` and building the sample.
E.g.
```
$ west build -p auto -b nrf5340pdk_nrf5340_cpuapp samples/bluetooth/peripheral
```
Signed-off-by: Peter Andersson <pelleplutt1976@gmail.com>
Retain the assumption that the loop will assign a pointer, but
initialize it pointer first to eliminate build warnings.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Remove all odr values from Kconfig and always init it
at 12.5Hz. It is responsibility of application to set
the rate to a different value using SENSOR_ATTR_SAMPLING_FREQUENCY.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Adds support for ADC on G0 series.
Simple implementation: sequencer not fully configurable,
and only one common sampling time.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The Bluetooth receiving thread may not be able to process broadcast
packets because the system API(bt_hci_cmd_send_sync) is in block state.
If HCI driver is still waiting buffer for adv report, an assertion will
be triggered.
Fixes: #30955
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
z_free_fd() is called twice then you close(). For example in ublox sara
r4 driver offload_close() calls modem_socket_put() where z_free_fd() is
called first time. Then this same function is called another time in
socket.c in z_impl_zsock_close() after this function has called
offload_close() in ublox sara r4 driver. This causes socket
descriptor leak.
Fixes#26819
Signed-off-by: Akseli Peltola <peltsu1324@gmail.com>
Flash size is specified in bits by SFDP and devicetree, but the stored
flash size is in bytes. Correct the divisor.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This patch adds the driver for Omnivision OV7725
Color CMOS VGA Sensor.
The driver currently provides a simple capture
function, the output format only provides
RGB565,640x480.
Signed-off-by: Frank Li <lgl88911@163.com>
This patch enables the rtc clock on the stm32g4 soc
from STMicroelectronics.
Even if the set by default (reset value of theRCC_APB1ENR)
the bit is marked as 1.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
After system reset, the PWR interface clock must be enabled
by setting the PWREN bit of the RCC_APBENR1
This sequence is needed to use the RTC.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This converts the intel_gna driver to use device tree instead of
kconfig for device configuration.
Fixes#30872
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The thresholds for activity/inactivity in the adxl362 acceleromter have
two parameters that can be configured. Currently the threshold is
configurable via the KConfig variables CONFIG_ADXL362_ACTIVITY_THRESHOLD
and CONFIG_ADXL362_INACTIVITY_THRESHOLD which configure repectively the
value in the THRESH_ACT and THRESH_INACT registers.
The other parameter that can be configured is the time by changing the
values in the registers TIME_ACT and TIME_INACT, but this values are
hardcoded to 1 (see lines 653 and 675 in adxl362.c), this patch adds
support for configuring those values in KConfig as
CONFIG_ADXL362_ACTIVITY_TIME and CONFIG_ADXL362_INACTIVITY_TIME.
Signed-off-by: Xavier Naveira <xnaveira@gmail.com>
Change switches to using static memory for out endpoints. Using
heap is not necessary, because number of out endpoints is defined
in DTS.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Add a new display-inversion property to ili9xxx based display drivers to
send a "Display Inversion ON (0x21)" command during initialization.
This seems to be required for some ILI9xxx based displays to work
correctly, such as BuyDisplay ER-TFT028A2-4 (ILI9341 basd IPS display).
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
It is possible to use the UART abstraction for USB communications
without any of the dedicated UART drivers being enabled. This currently
causes a compilation error because CMake throws an error if a library
has no sources. The empty file forces there to be at least one file in
the library when `CONFIG_USB_CDC_ACM` is enabled.
Removing `select CONFIG_SERIAL_HAS_DRIVER` from `CONFIG_USB_CDC_ACM` is
not a valid solution as this symbol is required by `CONFIG_UART_CONSOLE`
and therefore `USB_UART_CONSOLE`.
Fixes#31067.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Need to declare the device before the pointer can be obtained, and to
validate the device before trying to use it.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
For a while now, we've had two APIC drivers. The older was preserved
initially as the new (much smaller, "new style") code didn't have
support for Quark interrupt handling. But that's long dead now. Just
remove it.
Note that this migrates the one board using this driver (acrn) to
CONFIG_APIC_TIMER instead.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>