Nucleo L432KC board json

Choosing board = nucleo_l432kc causes the clock init code from Arduino_Core_STM32/variants/STM32L4xx/L432K(B-C)U_L442KCU/variant_NUCLEO_L432KC.cpp at main · stm32duino/Arduino_Core_STM32 · GitHub to be used. It wants to start the low speed external oscillator (32.768 kHz quartz). Do you have such a crystal on your board connected to your chip on OSC32K etc.? If not, this clock init will fail for you. With board = generic... you will get the Arduino_Core_STM32/variants/STM32L4xx/L432K(B-C)U_L442KCU/generic_clock.c at main · stm32duino/Arduino_Core_STM32 · GitHub clock code, which doesn’t try to activate LSE (which you say is working for you). So, seems all logical to me.