I am trying to generate a random number in the 0-255 range. I am using srand and rand. In order to generate the seed with srand I am using a value taken from the ticks passed since board was on.
If I run my program using JTag it will work correctly. This means that every time I run it, I will get a different number.
In the other hand, when I download the code to the board and run it without JTAG, I am getting the same result on every run. I check the ticks passed and I am using different numbers to create the seed on every run.
Any solution to generate a random number each time?
Thanks,