The residence permit is usually issued for a period of 2 years, renewable, provided that you still meet the economic requirements and you have lived at least 183 days in Spain each year. After 5 years of holding the temporary residence permit, you will be eligible for permanent residency.
source