Generating varying frequencies on pin PA21 for ATSAMD21G18AU

Please follow the advice given in the link below when posting code . Use [color = red]code tags[/color] when posting code here to make it easier to read and copy for examination