Altera_Forum
Honored Contributor
9 years agousleep Compiled out?
Hello,
I have a Max 10 based project that is running into an interesting/confusing bug. My project is connected to an image sensor, and is using a Nios based I2C master to control the sensor. It makes a series of I2C writes to the sensors, where the first write is a reset/don't run command, followed by a 5ms break, then the rest of the register writes for settings. When I program my fpga, and then use the eclipse tool "Run as Nios Hardware" command, I can see these writes, spaced out by the 5ms pause, (and proper image data), on my logic probe. When I elf2hex the code, check the hex into the Onchip Memory module in QSYS, regenerate QSYS, recompile Quartus, and use the programmer to push the .pof file, I see these I2C writes, with no 5ms, (and resultantly, no proper image data). I have tried this process twice now, and cannot seem to get the 5ms pause I need. So, my question is, is there a possibility the hex file is being compiled without the usleep command, or some other Quartus compile flag I am not aware of, that would be preventing my 5ms sleep pause? Thank you for any advice (and let me know if you need more details).