However, I'll be the first to admit I had no idea the coup would end the way it seems to be ending.
President Compaore's 27-year rule ended on Halloween last year in response to street protests when he and his ruling party, the CDP, tried to remove the term-limits so Compaore could run for another term as president. An interim government planned for elections in October 2015, but a new electoral code banned the CDP and its allies from running. The CDP appealed to the ECOWAS Court, and that Court said the ban violated the former ruling party's human rights, but the Burkina Faso Constitutional Court ignored that ruling and enforced the electoral code, banning the CDP. Meanwhile, a commission of the interim government recommended disbanding Compaore's elite presidential guard (RSP), and was investigating the assassination of Thomas Sankara, who was overthrown by Sankara's friend Compaore and Gilbert Diendéré, among others. Diendéré was one of Compaore's top military men, and when the RSP was recommended to be disbanded, Diendéré led the RSP into a coup against the interim government, with the stated goal of holding more inclusive presidential elections.
For a longer summary of recent events (before today's action by the army), see this excellent Monkey Cage post by Molly Ariotti and Naunihal Singh.
One important point Ariotti and Singh make is that last week's coup was launched by the (rather small) presidential guard, and not by the larger regular military. However, the coup leaders attempted to send a signal that the coup was launched by the military larger military. "The officer appeared in the uniform of the regular armed forces rather than the so-called “leopard” print of the RSP, implying that the coup was the action of the united military rather than one faction."
People often don't think of the military as being made up of different factions, but this is often the case in developing countries, particularly those with a history of the military getting involved in politics. The dynamics of military coups are sometimes described as what is known in game theory as a "Battle of the Sexes" - one spouse wants to pursue one activity (ballet or takeover of the government), another spouse wants to purse a different activity (baseball or remaining in the barracks), but both want to be doing the activity together. So there are two possible equilibria - both at the ballet/in government, or both at the baseball game/in the barracks. Where the couple (or the military) ends up depends on the "focal point."
The RSP tried to make take over of the government into the "focal point" by describing the coup as a fait accompli after jailing the interim government and making broadcasts on the national TV stations wearing a regular army uniform, and although some civilians were killed, no one in the military was.
However, today's actions show that the regular military is not going along with the RSP's focal point, and is pushing for a focal point in the "return to the barracks" equilibrium outcome.
One can imagine that there may have been some resentment in the regular military against the elite presidential guard. As Ariotti and Singh note, "Members of the RSP were given better accommodations and higher wages, as well as better weapons than the rest of the armed forces, and were chosen for their loyalty to the president." Following the logic of the Battle of the Sexes, the regular military is striving to maintain internal cohesion in the armed forces even as it marches on the RSP-held capital. In the statement from the chiefs of the armed forces, "We demand that they put down their weapons and rejoin Camp Sangoule Lamizana," If members of the RSP follow those orders, the statement says, "They and their families will be protected."
My guess is that the RSP will step down, perhaps after negotiating some amnesty for both their activities last week and any role in the death of Sankara in 1987. I would guess the negotiations would also include changes to the electoral code, so the CDP can participate. What seems less likely is the continuation of the presidential guard (RSP) in its current form. Elite and loyal presidential guards, as a counterweight to the regular military, is a common and generally successful coup-proofing technique, but this particular guard has demonstrated that it is loyal to its former boss (Compaore) and not to successors from his opposition.