The photos below show a variety of cannons and mortars that were used to attack medieval castles, and were ultimately responsible for their end.
All four of the photos above represent a significant threat to castles. From the earliest cannons (top left corner) and the smallest mortars (bottom left corner) to the larger mortar (top right corner) and the large cannon (bottom right corner), these weapons were all strong enough to inflict damage to castle walls.
Although the small cannons were only just effective, the larger versions that developed from them were able to knock down entire castle walls with sustained gunfire, making them a significant addition to an army during the age of castles.
Mortars were mainly used to fire cannonballs over walls to kills soldiers in courtyards, while cannons wold be used to damage and eventually destroy castle walls.
These weapons were so effective, in fact, that they eventually made castles obsolete - monarchs considered that castle building was irrelevant when they were so susceptible to gunpowder, so it became more cost effective to simply engineer artillery (the name given to cannons and mortars) instead.
The use of rounded walls could occasionally deflect the fire, but this was more by luck than judgement. Ultimately, should a cannonball hit a rounded tower directly, a significant amount of damage would be done.
This effectiveness and cost efficiency made them an obvious choice, particularly as they advanced, and they were a key factor in the demise of the castle era.
"The End of Castles". HistoryLearning.com. 2015. Web.