external Interrupts on ARM devices doesn´t work

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
ARM
Posts: 29
Joined: Sun Oct 04, 2015 11:52 am
Been thanked: 3 times
Contact:

external Interrupts on ARM devices doesn´t work

Post 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?
Attachments
Flowcode HMI-Control 2.fcfx
(18.92 KiB) Downloaded 349 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: external Interrupts on ARM devices doesn´t work

Post 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 311 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.

ARM
Posts: 29
Joined: Sun Oct 04, 2015 11:52 am
Been thanked: 3 times
Contact:

Re: external Interrupts on ARM devices doesn´t work

Post 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

ARM
Posts: 29
Joined: Sun Oct 04, 2015 11:52 am
Been thanked: 3 times
Contact:

Re: external Interrupts on ARM devices doesn´t work

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: external Interrupts on ARM devices doesn´t work

Post by Benj »

Hello,

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

ARM
Posts: 29
Joined: Sun Oct 04, 2015 11:52 am
Been thanked: 3 times
Contact:

Re: external Interrupts on ARM devices doesn´t work

Post 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 306 times
transmit protocol of edip display:
see attachment page 8 and 9.
edip240-7e.pdf
(1001.9 KiB) Downloaded 435 times

kind regards
ARM

ARM
Posts: 29
Joined: Sun Oct 04, 2015 11:52 am
Been thanked: 3 times
Contact:

Re: external Interrupts on ARM devices doesn´t work

Post by ARM »

Hello,

can you fix the problem?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: external Interrupts on ARM devices doesn´t work

Post 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?

ARM
Posts: 29
Joined: Sun Oct 04, 2015 11:52 am
Been thanked: 3 times
Contact:

Re: external Interrupts on ARM devices doesn´t work

Post 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).

Post Reply