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?
external Interrupts on ARM devices doesn´t work
Moderator: Benj
external Interrupts on ARM devices doesn´t work
- Attachments
-
- Flowcode HMI-Control 2.fcfx
- (18.92 KiB) Downloaded 349 times
- 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
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.
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.
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: external Interrupts on ARM devices doesn´t work
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
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
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
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
- 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
Hello,
Ok I have made the mods to the 64 pin version too.
Let me know how you get on.
Ok I have made the mods to the 64 pin version too.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: external Interrupts on ARM devices doesn´t work
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. transmit protocol of edip display:
see attachment page 8 and 9.
kind regards
ARM
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. transmit protocol of edip display:
see attachment page 8 and 9.
kind regards
ARM
- 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
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?
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?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: external Interrupts on ARM devices doesn´t work
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).
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).