Hi All,
I'm using Atmel Studio 7. Connected to a test board via a power debugger. At the moment I have a scope attached to PA05, and created the most basic project with a timer running from the 32kHz external watch crystal. The project is also setup to multiple up the watch crystal using the DFLL (to around 2MHz). The Device is a ATSAML10D15A.
The code compiles fine, the the "gpio_toggle_pin_level"(PA05_SPARE) has no effect in the timer call back function. I'm unable to put a breakpoint on that line at all. But the bugger lets me step over it. If I put a breakpoint on the line during code edit, the breakpoint is moved when debugging on a line.
99% of the code is the default code generated by the START WIZARD. All I am trying to do it check the operation of the interrupt and the speed of it.
#include <atmel_start.h>
static struct timer_task TIMER_0_task1;
int main(void)
{
/* Initializes MCU, drivers and middleware */
atmel_start_init();
TIMER_0_example();
/* Replace with your application code */
while (1)
{
__NOP();
}
}static void TIMER_0_task1_cb(const struct timer_task *const timer_task)
{
__NOP();
gpio_toggle_pin_level(PA05_SPARE);
__NOP();
return;
}void TIMER_0_example(void)
{
TIMER_0_task1.interval = 10;
TIMER_0_task1.cb = TIMER_0_task1_cb;
TIMER_0_task1.mode = TIMER_TASK_REPEAT;timer_add_task(&TIMER_0, &TIMER_0_task1);
timer_start(&TIMER_0);
}
I am new to Atmel Studio and ARM. Normally I use Texas Instruments MSP430 series with the Rowley CrossStudio Complier. I have previous experience of 8bit PIC and MPLAB which was around 20 years ago.
Many thanks for any advice in advance.
Nick