This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 2a777381d6159e606779b559d4243000f37d3ce3
Author: Javier Alonso <[email protected]>
AuthorDate: Thu Aug 6 16:58:37 2026 +0200

    arch/kinetis: initializers clobbering rx_pin instead of enable_high
    
    The `rx_pin` configuration when `CONFIG_KINETIS_FLEXCAN2` is defined is
    overwritten if `PIN_CAN2_ENABLE` is defined, breaking the flexcan config
    for Kinetis MCU. Additionally, the `.enable_high` configuration points to
    a non-defined constant/macro (looks like a legacy from the first driver
    definition). Based on regularly maintained drivers (such as s32k3), this
    was changed to `CAN2_ENABLE_OUT`
    
    Signed-off-by: Javier Alonso <[email protected]>
---
 arch/arm/src/kinetis/kinetis_flexcan.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/kinetis/kinetis_flexcan.c 
b/arch/arm/src/kinetis/kinetis_flexcan.c
index 3c33b6bffb5..e93a41bb3eb 100644
--- a/arch/arm/src/kinetis/kinetis_flexcan.c
+++ b/arch/arm/src/kinetis/kinetis_flexcan.c
@@ -268,11 +268,11 @@ static const struct flexcan_config_s 
kinetis_flexcan2_config =
   .tx_pin    = PIN_CAN2_TX,
   .rx_pin    = PIN_CAN2_RX,
 #ifdef PIN_CAN2_ENABLE
-  .enable_pin = PIN_CAN2_ENABLE,
-  .rx_pin     = CAN2_ENABLE_HIGH,
+  .enable_pin  = PIN_CAN2_ENABLE,
+  .rx_pin      = CAN2_ENABLE_OUT,
 #else
-  .enable_pin = 0,
-  .rx_pin     = 0,
+  .enable_pin  = 0,
+  .enable_high = 0,
 #endif
   .bus_irq   = KINETIS_IRQ_CAN2_BUS,
   .error_irq = KINETIS_IRQ_CAN2_ERROR,

Reply via email to