Main Site Documentation

Interrupt-driven output: further adventures on the Raptor


#1

So: I’ve installed MDK-Lite v5.1. I’ve worked out how to set it up, located the RLP.h file and included AT91SAM9X35.H. I’ve defined RLP_ADDRESS and RLP_SIZE. I found some up-to-date documentation on how to call RLP functions and massaged the RLP samples until they work. I’ve even added one of those wait-while-button-pressed loops at the start of my managed app because reloading all the firmware just once was enough…

So now it looks as though my remaining problem is configuring and handling interrupts. Unfortunately all such code is processor-specific (by its nature) so published examples don’t help me. I need to fire an interrupt every 10us or so (100KHz). I can read the CPU datasheet, but there’s an awful lot of it! If someone could help me fast track this I’d be very grateful. The issues:
[ul]If I set up a PWM output pin (perhaps using managed code) and set it running, can I generate an interrupt on each rising (or falling) edge? (Ideally I would like this ‘clock’ signal on an external pin as well as using it to generate interrupts).[/ul]
[ul]Alternatively, can I do this with a timer?[/ul]
[ul]How do I configure the interrupt (using either managed or native code)?[/ul]
[ul]Do I need to re-enable the interrupt within the ISR?[/ul]
[ul]How do I relate the pin I specify in managed code to the necessary native calls?[/ul]
[ul]How do I ensure that I’m not using an interrupt that the system is already using?[/ul]
[ul]Is it worth looking at transferring the data out using DMA instead? (I find quite a few questions on the forum about DMA, but very few answers)[/ul]

Many thanks for any advice.


#2

Please see https://www.ghielectronics.com/community/forum/topic?id=16152 for an answer to the question “How do I relate the pin I specify in managed code to the necessary native calls?”

I do hope I’m not going to have to answer all of them myself!