Our GAAP gross margin was 52.9%, which differed from non-GAAP due to noncash purchase accounting adjustments related to our acquisitions of Zarlink and Maxim's timing, synchronization and synthesis businesses, as well as Thailand-related, noncash inventory charges net of insurance proceeds. Our GAAP gross margin was up 70 basis points from the 52.2% in our first quarter of 2012 and up 830 basis points from the 44.6% in our prior year second quarter.
This quarter, non-GAAP selling, general and administrative expenses were $40 million or 16% of sales compared to $40.5 million or 16.8% of sales in the first quarter and compared to $35.3 million or 17% of sales in the second quarter of last year. For the third quarter, we expect total SG&A to end [ph] at 15% of sales. Compared to the first quarter, the SG&A change included the addition of incremental expense from Zarlink for a full quarter. It was offset by savings from cost control and spending efficiencies within the company.
Research and development costs were $42.2 million or 16.9% of sales compared to $39.6 million or 16.4% of sales in the first quarter and compared to $28.2 million or 13.6% of sales in the year-ago second quarter with the increase in dollars, due primarily to incremental expense at Zarlink for a full quarter and the incremental Maxim's timing, synchronization and synthesis businesses. For the third quarter, we expect total R&D to stay at roughly 16.9% of sales, representing our continued commitment to our product roadmap.
Our non-GAAP operating income was $54.9 million or 22% of sales, compared to $51.8 million or 21.5% of sales in the first quarter of 2012 and $53 million or 25.6% in the prior year second quarter. We recorded $10.1 million in non-GAAP interest and other expense in the second quarter compared to $11.8 million in the first quarter, reflecting the refinancing during the second quarter of our term loan to a rate of 4% from 5.75%. We expect the total amount of interest and other expense to be approximately $9 billion in the third quarter.Read the rest of this transcript for free on seekingalpha.com