He was born the 13 of March of one year between 1788 and 1792 in Torrelavega, probably in 1790.The 28 of may of 1808 he joined the army as a cadet and he fought in the independence war to the orders of Porlier. When the war ended he was in Levante and he promoted to liutenant because of his intervention in Torrelavega. In 1813 he was promoted to captain and after the return of Fernando VII he declared of liberal ideology and in 1820 he joined to the Patriotic Society of Santander. He was appointed governor of the Castle of Maella and he directed a convoy between 1822 and 1823. He was pursuing factious until may of that year, when he moved to Guadalajara to be a part of a volunteers group. In June he returned to his regiment and he traveled to Alicante, where they joined to the enemy. In January of 1824 he was incapacitated indefinitely. In 1833 Fernando VII died and his brother Carlos was going to suceed but Fernando´s daughter Isabel was against that and this ended in the ``Carlists wars´´. In this wars, Castañeda was a partidary of Isabel and he became the assistant of the commander of Santander. In 1834 he was promoted to Captain again and in less than a year in a colonel and to Brigadier in March of 1836.
In the general elections of 1837 he presented to the progresist candidature of Santander. He recieved the laurels of San Fernando because of his participation in the besiegement of Bilbao and he was appointed Count of Udalla because of his participation in the battle of the bridge of Udalla. He was promoted to quarterback in 1839 and appointed general commander of the expedetionary division of the north.
In 1841 he was elected senator by Teruel as a progresist. In that year he got the cross of San Hermenegildo. In the following years he was promoted to general commander of Vizcaya, general captain of Burgos and senator by Santander. In 1854 he was promoted to general liutenant and the following year general captain of Extremadura.
In 1867, general prim appointed him as the general chief of all the revolutioner forces of Castilla La Vieja and president of all the boards that would be create.
He died in 1872 and in 1991 his descendants donate to the local archive his papers and letters, creating the archive of the Castañeda general.
Archive of the general Castañeda