The riverside curtain wall dates from the 12th century, when the castle was first surrounded by a stone wall.