Shop OBEX P1 Docs P2 Docs Learn Events
CLKFREQ change during runtime — Parallax Forums

CLKFREQ change during runtime

Laci82Laci82 Posts: 1
edited 2010-11-17 09:28 in Propeller 1
Hello,

I have a problem with the clkfreq.
I try to open a file (it is working), but the clkFreq value change during this process and I don't know why. The value befor open: 80.000.000, value after : 3.
Code:

ser.dec(clkfreq)
waitcnt(cnt + 2 * clkfreq)

if strcomp(fsrw.openFile(fileNamePtr,"r"),fileNamePtr) == false
ser.str(string(13,10,"File not found!"))
return -1'fail
ser.dec(clkfreq)
waitcnt(cnt + 2 * clkfreq)

Please Help!

Laci

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-17 09:28
    It's very difficult to tell what's going on from just a small program fragment. Usually the problem is somewhere else. Keep in mind that CLKFREQ is just the 1st 4 bytes of memory. If you're using pointers and the pointer value is zero, it's easy to accidentally change CLKFREQ via a pointer reference. For example,

    LONG[ Pointer ] := 3

    will change CLKFREQ to 3 if Pointer is zero.
Sign In or Register to comment.