Pete

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: readUserBackupRegister #22516
    Pete
    Participant

    Hi Jason –

    Thanks so much for the example code!

    Your code works perfectly for me. With this, I now have a good example, and can work to fix my code.

    I really appreciate you taking the time to help this amateur out!

    in reply to: readUserBackupRegister #22514
    Pete
    Participant

    Thanks for looking at my code snippets, Jason –

    I have other code that uses the same format and works fine, so I don’t think it has to do with my check on MDOT_OK. I did change my test to:

    if ((ret = dot->readUserBackupRegister(0, sleeptime)) == true)

    But no difference.

    The problem is that it successfully reads and writes, but the actual data is no good.

    When waking from sleep, I get –
    Read in sleeptime as 134219489

    Even though I have written the register to be 1, it still reads as 134219489.

    Register 1 is no better, it’s just a 0, and I cannot change it.

    in reply to: readUserBackupRegister #22509
    Pete
    Participant

    Are there no Multitech devs around there that help a guy out?

    in reply to: readUserBackupRegister #22495
    Pete
    Participant

    I’m sorry, I was not very clear, and had typos. Both readUserBackRegister and write fail.

    Beginning code:

        if ((ret = dot->readUserBackupRegister(0, sleeptime)) != mDot::MDOT_OK){ 
            pc.printf("Failed to read - sleeptime is %d\r\n",sleeptime); 
            } else {
                pc.printf("Read in sleeptime as %d\r\n",sleeptime); 
            }
        if(sleeptime > 2000) sleeptime = 1; // sleeptime is some crazy number
        pc.printf("Sleep set for %d Minutes\n\r", sleeptime);  
         
    

    End Code

                
                if ((ret = dot->writeUserBackupRegister(0, sleeptime)) != mDot::MDOT_OK){ 
                        pc.printf("Failed to write sleeptime\r\n"); 
                        } else {
                              pc.printf("Wrote sleeptime as %d\r\n",sleeptime); 
                        }
                    

    Output is

    
    Failed to read - sleeptime is 134219489
    Sleep set for 1 Minutes
    .
    .
    .
    Failed to write sleeptime
    Sleeping 60 seconds or 1 minutes.
    
    • This reply was modified 6 years, 3 months ago by Pete.
    in reply to: readUserBackupRegister #22491
    Pete
    Participant

    Anyone?

    This is an mDot, that I’m trying to keep persistent variables across sleep.

    in reply to: Newbie Q: Red Light at powerup, flashing procedure #16301
    Pete
    Participant

    Hi Mike –

    Sorry, I should have mentioned – I’m on Win 10 Pro, on a Microsoft Surface, no less.

    I’ve done plenty of programming mbed+NXP so I think my environment is good otherwise.

Viewing 6 posts - 1 through 6 (of 6 total)