2019-10-13 11:10 AM
I'd like to develop an application on the dual-core STM32H7 line. To simplify development, I'd like to use the same firmware for both cores. Is this possible?
As I understand it, accessing the SCB->CPUID can tell me which core is running. Okay, so that's what I can use to have the program do different things based on which core is running it.
To start both cores at the same time, it looks like you set option bytes BCM7=BCM4=1.
To start both in flash bank one, it looks like you set BCM7_ADD0=BCM4_ADD0=0x08000000.
So the firmware startup would be something like the following:
It appears that the ISR vector for CM4 and CM7 are identical in length, based on the startupt file that STM32CubeMX generated, so using the same one for both should work. Seemds odd, but I guess they both access the same peripherals so maybe that makes sense.
The auto-generated linker files for the CM4 core and the CM7 core are almost identical except (a) different flash memory locations, (b) different RAM locations. Only the CM7 has access to the TCM, so I'll have to use the SRAM instead.
Are there any other roadblocks to this scheme I'm not thinking about?