SAMD51 External IRQ Driver

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

I'm trying to setup simple external IRQ on 3 pins over a SAMD51;. I'm using atmel start.

I'm at the very basi:

1) I've setup the External IRQ in start

 

 

 

 

2) i've copied the code from the example inside the main

 

static void button_on_PB10_pressed(void)
{
	test = 1;
}

static void button_on_PB11_pressed(void)
{
	test = 1;
}

static void button_on_PB12_pressed(void)
{
	test = 1;
}

/**
 * Example of using EXTERNAL_IRQ_0
 */
static void EXTERNAL_IRQ_0_Load(void)
{

	ext_irq_register(PIN_PB10, button_on_PB10_pressed);
	ext_irq_register(PIN_PB11, button_on_PB11_pressed);
	ext_irq_register(PIN_PB12, button_on_PB12_pressed);
}

int main(void)
{
	/* Initializes MCU, drivers and middleware */
	atmel_start_init();
	EXTERNAL_IRQ_0_Load();

	/* Replace with your application code */
	while (1)
	{

	}
}

 

3) I've put some breakpoint inside the event handlers to debug

 

Nothings works.

 

Actually debugging i have understood that the system crash right after the invocation of the External IRQ init function (EXTERNAL_IRQ_0_Load()).

 

Can someone help me?

 

Thanks,

 

Filo 

Last Edited: Mon. Sep 14, 2020 - 05:27 PM