Skip to content

Commit 7c3a3f4

Browse files
spi_nxp_lpspi: Reset peripheral on startup
Ensure that LPSPI is in POR state when initializing Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
1 parent b426d2a commit 7c3a3f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/spi/spi_nxp_lpspi/spi_nxp_lpspi_common.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018, 2024 NXP
2+
* Copyright 2018, 2024-2025 NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -130,6 +130,7 @@ int spi_mcux_configure(const struct device *dev, const struct spi_config *spi_cf
130130

131131
int spi_nxp_init_common(const struct device *dev)
132132
{
133+
LPSPI_Type *base = (LPSPI_Type *)DEVICE_MMIO_NAMED_GET(dev, reg_base);
133134
const struct spi_mcux_config *config = dev->config;
134135
struct spi_mcux_data *data = dev->data;
135136
int err = 0;
@@ -153,6 +154,8 @@ int spi_nxp_init_common(const struct device *dev)
153154
return err;
154155
}
155156

157+
LPSPI_Reset(base);
158+
156159
config->irq_config_func(dev);
157160

158161
return err;

0 commit comments

Comments
 (0)