I recently tested some (most) of them with ASFv3.31.0 and they seem to work fine. I’ve also added more examples here.
While working with the SAM4s Xplained Pro I realized the scarcity of documentation available. Atmel examples, when available, would sometimes work, and some others not. Either because instructions would be missing steps (this happened with the USB CDC), or just because. In any case, this is a set of working examples that might save you from a headache. They were tested with ASF v3.22.. In the downloads you’ll find a document with the demo’s source code, as well as the steps required to incorporate the functionality into a ASF project (I tested all the demos starting with the Starter Kit Demo – SAM4s Xplained Pro as template). Sample code includes ADC, PWM, GPIO, USART, TWI, SysTick, FatFS, RTC, USB CDC, SSD1306, and Buttons. For more example