Skip to main content
Richard Braun
Associate
July 3, 2018
Question

Unexpected CCM state after using the STM32F4 boot loader

  • July 3, 2018
  • 9 replies
  • 1513 views
Posted on July 03, 2018 at 12:06

Hello,

We use the STM32F4 boot loader to load a firmware directly to RAM and run from there, and we noticed that, for an unknown reason, the CCMDATARAMEN bit of RCC_AHB1ENR is not set, making the CCM unusable for very early initialization. Setting the bit manually before any access solves the problem. I'm not sure if this is expected behavior (in which case it ought to be documented in the boot loader application note) or a boot loader bug. Our MCU is an STM32F427.

Thanks.

    This topic has been closed for replies.

    9 replies

    Tesla DeLorean
    Guru
    July 3, 2018
    Posted on July 03, 2018 at 14:18

    >>I'm not sure if this is expected behavior (in which case it ought to be documented in the boot loader application note) or a boot loader bug.

    The Boot Loader doesn't use the CCM, why would it initialize clocks for it, or any other peripheral it is not using?

    Like the External Loaders (ST-LINK Utilities, Cube Programmer), you need to initialize clocks, pins, peripherals and functionality you expect to use, on your specific board, as implemented.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    waclawek.jan
    Super User
    July 3, 2018
    Posted on July 03, 2018 at 18:43

    But Clive,

    0690X0000060Lb0QAE.png

    I'd say the bootloader upon exit attempts to do housekeeping and restore registers to their reset values; and this is a bug in the bootloader.

    JW

    Tesla DeLorean
    Guru
    July 3, 2018
    Posted on July 03, 2018 at 19:05

    Pretty sure it just blind writes the values it wants in RCC_AHB1ENR, which might be inconvenient

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..