Skip to main content
Visitor II
October 8, 2022
Question

STM32F401 won't start

  • October 8, 2022
  • 3 replies
  • 1480 views

I have a 3x4 matrix keyboard attached to STM32F401, see schematics (the U4 represents a "black pill" PCB). PB0, PB1, PB2 are column outputs in push-pull mode. PC15, PA0, PA1, PB10 are row inputs in EXTI mode with pull-ups enabled.

The circuit worked as expected during development in lab. When installed in car, it also worked OK until I connected the keyboard. With keyboard connected, the MCU doesn't start at power up and I need to press the reset button to let the FW start. It then works as expected, without missed keypress detections and without false key detections.

The keyboard is connected by seven 1.4m long 0.25mm thick transformer wires twisted altogether.

Adding a 10k pull-up to NRST and to BOOT1 pins didn't help. BOOT0 pin already has a 10k pull-down.

How to diagnose and fix this?

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    October 8, 2022

    OK, this is a board where normally the manufacturer, in this case WeAct Studio, can give you information and support. But I can try to isolate the problem:

    When was this board manufactured?

    WeAct states on its website: [If the chip on the board is] STM32F401CCU6 - We have stopped production in 2020.6, if the online shopping platform merchant's promotional materials are still marked STM32F401CCU6, then this merchant sells piracy, please do not buy!

    On the website you can also find more information on how to recognise such counterfeits.

    So if the board is younger, you can assume it is a clone or counterfeit, where the function of the STM32 is not guaranteed.

    Regards

    /Peter

    Graduate II
    October 9, 2022

    > Adding a 10k pull-up to NRST

    You have to remove the pull-up from the board, which was put there by dumb copy-paste "engineers", not add another one!

    MZadn.2Author
    Visitor II
    October 9, 2022

    @Piranha: no pull-up on NRST installed on my board originally.

    I narrowed the problem to the PB0 & PB1 outputs. Only those two prevent the MCU from starting when they are connected to the keyboard. A workaround was to leave them at default reset state in Device Configuration Tool in STM32CubeIDE and only configure them as outputs later on in my initialization code.