Page 1 of 1

external Interrupts on ARM devices doesn´t work

Posted: Sun Oct 04, 2015 12:10 pm
by ARM
Hello,

how can I use external Interrupts on ARM devices and set their Interrupt priority?

In my project I use serial communication to edip Touch display. I want to connect the EN-Pin from the display (EN-pin is used for signalisation that a touch button is pressed) to external Interrupt pin to an AT91SAM7S512. I testet INT1 and INT0 Pin with falling or rising edge. But it doesn´t work.

Further, is it possible so set the Interrupt Priority?

Re: external Interrupts on ARM devices doesn´t work

Posted: Tue Oct 06, 2015 10:07 am
by Benj
Hello,

I have had a go at a fix for you. Please can you copy the attached file into your "Flowcode 6/FCD/ARM" directory before starting Flowcode.
AT91SAM7S512.fcdx
(16.73 KiB) Downloaded 316 times
Hopefully this should allow the interrupts to work for you. Let me know how you get on.

I've had a quick look at interrupt priority in the datasheet. I can't really say I understand it but it's still early in the day so I will have another look after I've had some coffee.

Re: external Interrupts on ARM devices doesn´t work

Posted: Tue Oct 06, 2015 10:01 pm
by ARM
Hello Benj,

thank you very much for the fast fix. I will test it on the weekend and i will give you answer.

greetings

ARM

Re: external Interrupts on ARM devices doesn´t work

Posted: Tue Oct 06, 2015 10:22 pm
by ARM
Hello,

I just take a look at the fixed file and I had seen that the I/O configuration is not correct, because the file is for AT91SAM7S512 with 32 pins. But I use the AT91SAM7S512_64 with 64 pins.


gretings

ARM

Re: external Interrupts on ARM devices doesn´t work

Posted: Wed Oct 07, 2015 10:01 am
by Benj
Hello,

Ok I have made the mods to the 64 pin version too.
AT91SAM7S512_64.fcdx
(17.4 KiB) Downloaded 308 times
Let me know how you get on.

Re: external Interrupts on ARM devices doesn´t work

Posted: Sat Oct 10, 2015 12:01 pm
by ARM
External INT0 and INT1 works fine.
TXINT0 also works.

RXINT0 no function.

When I´m collecting serial data without interrupt, the first byte is ok but all following bytes have value 0xFF (Macro: Initialise_ReadTouchData - at the end of macro). But the first byte is only ok when I´m starting controller with power on and off. When I do reset only, the first and all other bytes have also value 0xFF.
Flowcode HMI-Control 2.fcfx
(21.17 KiB) Downloaded 314 times
transmit protocol of edip display:
see attachment page 8 and 9.
edip240-7e.pdf
(1001.9 KiB) Downloaded 452 times

kind regards
ARM

Re: external Interrupts on ARM devices doesn´t work

Posted: Thu Oct 15, 2015 8:45 pm
by ARM
Hello,

can you fix the problem?

Re: external Interrupts on ARM devices doesn´t work

Posted: Mon Oct 19, 2015 5:12 pm
by Benj
Hello,

In your program you seem to have two interrupts which both read data from the serial UART. Could the problem be something to do with this?

Re: external Interrupts on ARM devices doesn´t work

Posted: Tue Oct 20, 2015 8:20 pm
by ARM
Hello,

I´m sorry but I think it was a mistake.

In the Atmel datasheet of AT91SAM7s UART0 was connected to Port PA5 and PA6 and UART1 was connected to PA21 and PA22.
In Flowcode UART0 of the microcontroller was declared as channel 2 and is connect to PA5 and PA6. So UART0 is actually Channel 2 in Flowcode and not Channel 1 (or 0).