Wish: Sleep function with workaround for sleep silicon bug
Posted: 05 Apr 2008 07:32
In a previous thread I described the silicon bug with 32kHz oscillator and sleep in dsPIC30F series and tried to make a workaround with a gotosleep function for this bug (that affects sleep when the 32kHz oscillator is used) as recommended by Microchip:
http://www.mikroe.com/forum/viewtopic.p ... highlight=
However this did not work because the powersav #0 instruction has to be placed at the very end of the chips program memory (and the rest of that segment filled with nops), while the compiler will always have a return statement at the end of the procedure and refuse to compile if there is not space for it.
Thus the wish is that the compiler is equipped with a workaround for this according to the microchip instructions, that work with the smaller chips that are suitable for use as low power data loggers, sensors etc. (The larger 30F's seems to have a more serious bug that will prevent the 32kHz oscillator to work at all during sleep).
http://www.mikroe.com/forum/viewtopic.p ... highlight=
However this did not work because the powersav #0 instruction has to be placed at the very end of the chips program memory (and the rest of that segment filled with nops), while the compiler will always have a return statement at the end of the procedure and refuse to compile if there is not space for it.
Thus the wish is that the compiler is equipped with a workaround for this according to the microchip instructions, that work with the smaller chips that are suitable for use as low power data loggers, sensors etc. (The larger 30F's seems to have a more serious bug that will prevent the 32kHz oscillator to work at all during sleep).