You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Anthony Merlino <an...@vergeaero.com> on 2021/02/05 15:52:29 UTC

Supporting a heterogeneous dual-core

Hi all,

I am thinking of using the STM32H747XI for a project I'm working on. This
particular chip has a CortexM7 and a Cortex M4.  The chips access the same
memory map and can access and even share the same peripherals.

Part of the problem, however, is that NuttX resets many
registers/peripherals on boot. This is fine for when the M7 boots, but when
the M4 boots, resetting the RCC registers will ruin all the initialization
work the M7 has already done.  Temporarily, I added a config variable to
disable the clock reset on boot, but that's not the only place I'll need to
disable logic.

So I have 2 questions:

   1. Does anyone have any suggestions or comments for how to disable some
   of the standard bring-up logic such as rcc_reset() or other peripheral
   resets? I can add CONFIG options, but I'm afraid of how many options willl
   wind up needing to be added and it feels a little hacky.
   2. Organizationally, how to handle the 2 cores? Currently, I've added an
   option to the STM32H747I-Disco board that allows you to specify which core
   you are using. Really all that does is switch which flash bank you are
   targeting by switching the linker script. The M4 and M7 can share
   instructions as long as double FPU is disabled for the M4. Does a switch at
   the board level make sense? Or should this switch be at the arch level
   since it's technically the processor that's got the 2 cores?

Thanks!

-Anthony