Wall-mounted artillery

Kabe jō kotei hō (壁上固定砲) were the primary weapon used to engage the Titans before the development of vertical maneuvering equipment.

Despite the ability to blow a Titan's head off in one shot, half of all Titans will merely regenerate their heads; the only certain way to kill a Titan is to destroy the nape of its neck. In addition, the time it takes to reload and aim a cannon makes it inapplicable for offensive strategies against Titans. However, cannons are still used in static defense positions, most notably on top the Walls and near gates in the event of a breach. As such, they are used most often by the Garrison, who patrol such areas.

The militaries of Marley and the Mid-East Allied Forces have a more advanced version dubbed the anti-Titan artillery, in which they use modern artillery shells rather than primitive shells as well as being able to have more mobility since they can be mounted in armored vehicles like battleships or armored trains. Furthermore, the Marley military also possesses Howitzer cannons for long range attacks.

Ammunition
The cannons fire two different types of ammunition: High-Explosive Shells and Grapeshots. Given their poor accuracy, the cannon barrels are most likely smoothbore. The ammunition is breech-loaded, fired by pulling a string connected to a firing pin, and it takes about twenty seconds to reload.

High Explosive shells are used to attempt to kill a Titan by destroying the nape of the neck in the blast, but the cannons have terrible accuracy, making these shells almost useless at longer ranges.

Grapeshots are the more traditional cannon rounds and are mostly used to slow down Titan advances with their wide, dispersion shots (which are designed to take off as many limbs as possible in a wide area).

Piercing Shell: this type of ammunition is strong enough to pierce through the neck of any Titans, including Titan shifters, without any difficulty. The technology used to create piercing shells is only known to the Middle Eastern Alliance with their Anti-Titan Cannons.

Howitzer Shell: this type of ammunition is used for long range artillery barrage. The Marley military often uses this type of cannon to destroy enemies at far distance.

Developments
Prior to the breach of Wall Maria, Wall-mounted cannons had limited mobility and could only fire from one point inside or outside the Wall. After said breach, the Garrison was forced to bring them on the ground as to repel the Titan advance further.

Later developments led to railroads encircling the entire Wall, allowing cannons to bunch together and focus fire on a single point if necessary.

Before firing, the cannon must be solidly fixed to prevent the recoil from blowing it off the tracks. Wall-mounted cannons also possess the ability to fire directly downward, which can allow them to release punishing volleys of fire at Titans with no threat of reprisals.

Fall of Shiganshina arc
Cannons were used primarily by the Garrison after the fall of Wall Maria to repel the incoming Titans. The cannons placed on the ground, however, had little impact due to low range weapons targeted at high altitudes. The Garrison used these cannons to guard the inner gate of Shiganshina, but they could not stop the Armored Titan.

Battle of Trost District arc
Eren Yeager, among the other trainees, were assigned to clean the cannons whilst awaiting further instructions. After the breach of Trost District, the Colossus Titan deliberately disabled the cannons and the railroads on top of the Wall to prevent reserve cannons from being brought in. One of these canons was used in an attempt to kill Eren, Mikasa, and Armin, but Eren stopped the cannonball by shifting and developing a semi-transformed Titan.

Clash of the Titans arc
When the Survey Corps is trapped inside Utgard Castle, Reiner, Bertolt, Ymir, Connie and Historia are told to stop the smaller Titans from advancing inside the castle. One of these Titans is stopped by ramming it with a old cannon, making it unable to move.

The Uprising arc
The Garrison in the Orvud District used concentrated cannon fire against Rod Reiss' Titan Form in order to kill him. Although the cannons greatly damaged his back, there were not enough to stop his advance or to blow off the nape of his neck.

Attack on Titan: Before the Fall (Novel)
Around thirty years after the first appearance of the Titans, Angel Aaltonen was commissioned by the Military to design ten long range cannons which were later implemented atop Wall Maria in Shiganshina District.

Trivia

 * The fact that these cannons are quite inaccurate may come from their lack of rifling. Rifling is the process of making helical grooves inside the barrel of a gun. When a projectile is fired, the grooves make the ordnance spin, improving its aerodynamic stability and accuracy.

Navigation
Cañón Divers Objets dans SNK Kanonen