i am using Hydra and want to use RLPLight.
in C code i want to send data to serial port. i succeeded to do it but have a litte problem.
for some reasons i need to disbale interrupts (CPU’s interrupts) and then i cant back to C#…
C code is:
if i comment out the first 3 lines it works and returns 5, but now C doesnt return.
Do you know how can i disable all intrrupts except to “return to C#” interrupt ? which register is responsable on it and what is the value i need to give to enable only this interrupt?
@ shm3 - You will have to re-enable interrupts before exiting the RLP function. The execution engine which runs the managed code relies on things like the timer interrupts to handle the thread scheduling, handling of completions etc.
Yes, i know… i just thought that enable and diable it same register. Now i see that there are different registers for get status, for enable and for disable.
i just trying to understand the mapping between all registers.
e.g.:
#define AT91C_AIC_FFSR (AT91_CAST(AT91_REG *) 0xFFFFF148) // (AIC) Fast Forcing Status Register
I suspect that you have misunderstood the Fast Force Interrupt feature. I would suggest that you ignore that for now, since it sounds like all you want to do is disable/enable the interrupts. Fast Forcing is a alternative 'routing" of the interrupts, which I do not think you are really interested in.
The key registers you should be looking at are
AT91C_AIC_IECR -> Write 1s to enable the corresponding interrupts
AT91C_AIC_IDCR -> Write 1s to disable the corresponding interrupts
AT91C_AIC_IMR -> Mask indicating which interrupts are currently enabled (1s) or disabled (0s)
The Status Registers (AT91C_AIC_ISR/FFSR) indicate if the interrupt is currently triggered.
For more detail you can read chapter 29 of the data sheet for the processor.