Any thoughts on the overall design of multi-MCU systems?
I have been doing this for years… off-loading work to dedicated uC to handle duch thingsas an SD card for datalogging and a tuny85 handling IR receive.
http://www.hackster.io/rayburne/sd-card-serial-logger
http://www.hackster.io/rayburne/infrare … ed-decoder
I’m just using serial comms from a Mega2560 host to drive these off-board devices.
There are a significant advantages to doing this; for example, the SD card breakout provides the 3.3V to run the atmeha328P @8MHz. The IR module based in the tiny85 performs flawless for the Sony protocol and does the decoding and serial transfer back to the Mega.
With those items off and away, the Mega2560 can manage the dual OLED cockpit display in thd Europa, the two EGT sensors, the battery charge-discharge, Oil pressure, and water temp, fuel gague, and RTC. All the I/O is easily implemented as a State Machine and no interrupts ard required. The IR is used seldom, but the purpose is to set ths RTC module.
Ray
An interesting abstraction model would be to emulate a section of shared memory (as you typically have with multiple cores in a single MCU). Ie, both MCUs just read and write standard ram and some combination of hardware and library software transparently synchronize them.
But the there is a price to pay with multi-core or SMP. Allowing the “A” processor to access the “B” chip peripherials is problematic: where is the buffer, in “A” or in “B” or in that shared memory? Do we even care, does the magic compiler do the allication?
With RTOS, our tool sets stay the same, single-core, but we just play with simulated threads. In a multi-chip bridged design, thread assignment will always have a penalty if threads and peripherals I/O are in separate chips. Also, the RTOS must have a a peripheral understanding that I/O is dedicated in each separate uC chip external connection. The statement of work for a thread is no longer “blink the LED on pin 13” but now it becomes “on chip (0/1), blink the LED on pin 13.”
Too big of a headache, IMO. Might be fun to hack it out, but when faced with such requirements, my gut tells me to just go up the product line and buy the correct microcontroller for the requirements at hand. Or, like I have been doing, find the less demanding code and move the entire sub-system to a dedicated device.
Ray
With SPI, the challenge is in writing the slave code. In that sense an intermediate SPI device serving two masters is an improvement, but in practice it is just moving the problem around.
If your host controller has enough serial ports, then the UART connection is recommended. If there is a limit in available serial ports, you could consider a set of RS485 chips to share the lines. This is also a proper solution in case the distance between the host controller and peripheral controller is long.
Cheers, Ollie
But sure. In a small device it is pretty overkill
But sure. In a small device it is pretty overkill
This requires 2 SPI’s per device, one for each side, on a ring configuration. On low end F103 this would use all of the SPI’s available.
That 9 bit UART mode is interesting! Frees up the SPI for another uses (ILI9341
) A downside is that only one transaction can be made at a time (in a star configuration).
Making a “blue pill” MCU cluster… ![]()


