Interesting, at first glance I thought that must have been built before cannons were effectively used on buildings. The wiki article implies that the construction was likely from around 1250. Indeed, the cannon article on Wikipedia lists 1374 as the first time cannons were used effectively against structures. Without knowing that this was a castle of that age, I would have assumed this was early industrial revolution in origin based on the height and thin walls, and lower windows.
The arches were obviously filled in later, but it makes me wonder if they were originally filled too. Perhaps it provides a means to rebuild the structure most likely to be damaged and helps to prevent damage around the doors and windows from causing premature failures?