Using MOD-MAG INT1 on A20

Started by kantal, December 12, 2014, 06:59:53 PM

Previous topic - Next topic

kantal

Hi!

I just play with MOD-MAG.
I can poll the DR_STATUS register and read the magnetic values, it's ok.
I thought to try the INT1 controlled reading but my program can catch only one interrupt.
The test case is the following:

- The MOD-MAG is connected to UEXT1;
- In the fex file for the A20micro, the PI13 is taken out from the UART section and put into the gpio one:
   [gpio_para]
   gpio_num = 65
   gpio_pin_65 = port:PI13<default><default><default><default>

   [gpio_init]
   pin_65 = port:PI13<0><1><default><default>
   
   I tried these parameters, too:
    gpio_pin_65 = port:PI13<6><1><default><default>
   gpio_pin_65 = port:PI13<0><1><default><default>
   gpio_pin_65 = port:PI13<0><2><default><default>


The interrupt handling of PI13 in the program is OK, I tested it with a push button without the MOD-MAG.
The polling method is fully adequate but I wonder.
Any idea?