Clock tree problem with Nucleo-L432KC when using D7 and D8 as additional GPIOs

Hi all, I am working on a project using Nucleo-L432KC.

Since I need all the available IOs, I modified the jumpers on the Nucleo in order to disconnect D7 and D8 from the 32kHz crystal and to have them connected to PC_14 and PC_15 instead

It was initially not working, then I discovered I need to disable LSE in order to have D7 and D8 operating:
__HAL_RCC_LSE_CONFIG(RCC_LSE_OFF);

Now the problem is that the pins are actually working (BTW, D8 seems to be input-only), but often the board does not start-up, especially after flashing it.

Pressing the reset pushbutton a few times, makes it working.
I suspect the MCU cannot properly start-up without the 32kHz crystal connected…

Is there a place where to configure the clock tree to start-up with internal RC/HSI and switching to HSE crystal?

Thank you!
Walter

Hello,

this is not related to KeilStidio forum section.

From my point of view Mbed try to start LSE where is set a timeout around 5s, so you need to disable dependencies on disconnected LSE like a LowPowerTicker.
Try to do that via mbed_app.json with content below.

{
    "target_overrides": {
        "*": {
            "target.device_has_remove": ["LPTICKER"],
            "target.lse_available": 0
        }
    }
}

BR, Jan

Hi Jan,

thank you for the help!
Unfortunately, your suggestion seems to have no effect…

BR,
Walter

Ok, try updated settings from above.

BR, Jan

Mhmmm… As per your suggestion, here is my Mbed_app.json:

{
“requires”: [“bare-metal”],

"target_overrides": {
    "*": {
        "target.device_has_remove": ["LPTICKER"]",
        "target.lse_available": 0
    }
}

}

I get this error:

Build started
Using toolchain ARMC6 profile {‘ENV’: {‘ARMLMD_LICENSE_FILE’: ‘8224@10.100.166.33:8224@10.100.120.118’}, ‘PATHS’: {‘ARMC6_PATH’: ‘/opt/ARMCompiler6.15.13/bin/’, ‘ARM_PATH’: ‘/opt/armcc5_06_u6/’}, ‘common’: [‘-c’, ‘–gnu’, ‘-O3’, ‘-Otime’, ‘–split_sections’, ‘–apcs=interwork’], ‘cxx’: [‘–cpp’, ‘–no_rtti’], ‘COMPILE_C_AS_CPP’: False, ‘NEW_SCAN_RESOURCES’: True}
scan /tmp/chroots/ch-bab3bbbc-4634-47cc-857f-b5b7d7f908ae/src
scan /tmp/chroots/ch-bab3bbbc-4634-47cc-857f-b5b7d7f908ae/extras/mbed-os.lib
Could not parse mbed app configuration from /tmp/chroots/ch-bab3bbbc-4634-47cc-857f-b5b7d7f908ae/src/mbed_app.json
Internal error.
Build failed

BR, Walter

the last double quote before comma is my misstakate from copy & paste

BR, Jan

It works! Thank you so much!

BR, Walter

You’re welcome and good luck with your project.

BR, Jan