Project - Install a RLP interrupt on G120

Install a RLP interrupt on G120

This project is not fully working, but I will update it with any comments or findings until it is fully working.

Just extract the two projects to c:\RLP and when you use build on VS (unmanaged), it will deploy the elf file to the managed project resource folder.

The interrupt works but for some reason keep the MCU running in RLP and never return to the managed code until you release the interrupt signal.


Good one! Thanks!

Hi Mogollon,

just take a quick look over your code.

Maybe I am wrong, but it seems, that you read the count in the function ‘Query’ without stopping the Interrupt during this process.
This works, as Long the assignment is an atomic operation.
If not, you might get wrong values from time to time.
Problem is, that this only happens very seldom, if the time domains were very different and so this problems were hard to find.

Generally, if an interrupt Service Routine shares some data with the rest of the code and both were executes async (which is the main reason to use ISRs) one have to ensure, that only one alters the data in one atomic operation. Atomic means, that the ISR isn’t able to fire again.

With best regards