Disconnecting two batteries in parallel when motor turns on not working
This answer is in response to the OP asking via the comments for an example of a solution using a supercap instead of a secondary battery to power the uP circuit.

The topic of applying supercaps (super capacitors) comes up quite often so I will show the engineering process and math for application in other situations.

The OP states that he has a 5 volt switching regulator built from an ACT4088 chip buck design that is fed by the 12 volt battery bus. The uP draws 170 mA to 283 mA. The supercap must support the processor for a four second power droop period when the uP is commanding an engine cranking sequence.

To start, we calculate the energy in joules that the supercap must supply. Energy in joules is

Energy in Joules = Voltage * Current * Time in Seconds

We can place the capacitor on the 5 volt bus or on the 12 volt bus. Let's look at it in both cases. If it is on the 5 volt bus side, it is 5 volts * 300 mA * 4 seconds or 6 Joules. If we plan the supercap on the 12 volt side of the regulator, we also need to take into account the efficiency of the regulator. A quick look at the datasheet for the ACT4088 shows worst case should be 75%. So 6 Joules / 0.75 = 8 Joules.

Energy storage in a capacitor is given by the formula:

J = 1/2CV2

where J is the stored energy in joules, C is the capacitance in farads, and V is the voltage across the capacitor in volts. But this energy is only usable if we take the capacitor from its charged voltage all the way down to zero. This is not a typical use case. For example, if the capacitor is on the 5 volt bus, the circuit can probably only tolerate a low voltage of ~ 4.8 volts. So the usable energy is only the 5 volt down to the 4.8 volt range of the capacitor. On the other hand, if we place the capacitor on the 12 volt bus, the switching regulator can work down to about 7 volts. So now we can extract the energy available from 12 volts to 7 volts. We therefore need to calculate the energy stored in a capacitor only within the usable voltage range of our circuit. Let's call the maximum capacitor voltage VH and the minimum usable capacitor voltage VL. 

Energy available at VH= 1/2CVH2

Energy available at VL= 1/2CVL2

Usable Energy (joules) = 1/2CVH2-1/2CVL2

And since our goal is to determine what value of capacitor we need, let's rearrange the formula to solve for C

C = (2J)/(VH2-VL2)

If we apply this to the 5 volt capacitor solution, the result is ~ 6.1F. For the 12 volt solution, the result is ~ 0.17F. Note both results are Farads, not microFarads. This first order analysis shows that with all other things being equal, we should pursue the 12 volt design as our most economical option. For the sake of brevity, I will work out only the 12 volt option here.

Supercaps are now readily available in excess of 300 Farads. But there are some other design considerations. Supercaps have a relatively high DC ESR (Effective Series Resistance at Direct Current). This can be in the order of 0.05 ohms to in excess of 30 ohms. Since this ESR acts like a resistor in series with the supercap, it wastes some of the energy that is flowing in and out of the supercap so we must take this into account in the design. This ESR also places a limit on the maximum current that can be drawn from the capacitor. Also be aware that most of the supercaps are available in a voltage range of 2.7 volts to 7 volts. We can place supercaps in series to yield a higher voltage capacitor but we must also remember that then the ESR values add and the capacitance divides. On the economics side of the equation higher voltage, higher capacitance and lower ESR generally increases the cost of the capacitor. These economic factors must enter into the final capacitor configuration selection.

There are many supercap manufacturers but for the sake of this example, I will use the AVX SCMR18C105MRBA0 capacitor rated at 1.0F +/-20%, 5 volts, and 300 mOhm DC ESR according to its datasheet. By placing three of these in series, we have a 0.33 F +/-20%, 15 volt, 900 mOhm DC ESR capacitor, and a 1.5 amp maximum current. This is more than enough capacitance but let's do a quick check on the effect of the ESR. The switcher supply will draw its maximum current when its input voltage is at its lowest point. This is 7 volts in this example. The load with switcher efficiency taken into account is 5 volts * 300 mA / 0.75 or 2 watts. The current on the 12 volt bus when it is at 7 volts will be 2 watts / 7 volts = 0.286 amps. The current draw is below the maximum for this capacitor. Since the ESR is in series with this current, it will drop 0.286 amps * 0.9 ohms = 0.26 volts. This is quite acceptable.

The low volume price for this AVX capacitor is &lt; $3.15 USD so the supercap bank will cost &lt; $9.45 USD in low volume.

A few concluding design considerations: 

Normally, we should check if the capacitor charge time fits the application as well. In this case, the OP has stated that the resting time between engine cranks is also 4 seconds. Since the battery system has a very low effective series resistance, we are assured in this case that the supercap will quickly recover its full charge in less than 4 seconds. Also, since the switching regulator can work down to 7 volts, even a largely depleted primary battery (10 volts) will not affect the microprocessor circuit. But a nice addition to the microprocessor circuit might be to monitor the primary battery voltage and not allow cranking below a certain voltage.

The capacitor should be diode isolated from the 12 volt bus so that when it sags, it doesn't drain the supercap. The diode will drop 0.3 to 0.6 volts depending on the type. But this will not be a problem as the DC bus will typically have a voltage of 13.8 volts available which easily makes up for this drop. The diode should be a high current device to accommodate the surge current that will occur when the supercap is initially fully discharged.

13.8 volt vehicle systems have voltage spikes that could damage the 15 volt capacitor bank. Placing a suitable zener diode or other snubbing circuit across the capacitor will provide protection from these spikes.

The operating temperature range of the environment may place constraints on the capacitor selection. Consult the supercap datasheet to ensure a suitable device is selected. The supercaps used in this example have a working temperature range up to 65 degrees C without further derating.