OK, got it with the registers but now I have a new problem -
In RLP I have while(1) loop. It works fine, but now I cannot deploy new code. VS2010 writes “Preparing to deploy assemblies to the device” and nothing happens.
Anyone have an idea, how to work it around?
@ Stargazer - others might have better advice, but for me I just reset the device while deploying or just as the deploy starts. It might take a few attempts, but normally it will catch the device before at the right time and manage to deploy.
Tight loop and debugger not attaching - simplest way to deal with that is to hit reset and hope you have enough spare cycles in your app startup that allows the debugger to attach before it hits your tight loop again. Harder way is to go into bootloader and erase all. Best solution, like Mike says, don’t do a tight loop and return back up to managed code and rest
This is a very tight loop. You need to put Thread.Sleep() in it.
The referenced code is in C using RLPLite. There is no threading available with the lite version.
With RLPLite you have to call the routine from managed code and then return. The sleep would be in the managed code.
But, if you are playing with the registers, why not use the register class?
I’m working on an RLP solution with Hydra. AFAIK, there’s not libraries I can include, which will make my life easier. If there is, PLEASE let me know.
Now one more thing - I couldn’t find any simple code examples for RLPLite, which would explain simple things like setting ON and OFF a pin, reading data from a pin and so on. I’m trying to work with AT91SAM9RL64 chip, which is used on Hydra and it’s a bit complicated. The only thing I could find is AT91SAM9RL64.h which maps the CPU API, while it’s complicated too.