Announcement

Collapse
No announcement yet.

32PT sleep problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 32PT sleep problems

    I am experiencing this strange problem that I don't know how to tackle

    I have a 32PT GFX R25. If I enter into sleep mode, get back from it via touch and then try continuing my program it hangs on the next file access routine (either an img_Disable instruction or a file_PlayWAV)

    am I missing somethin? is the file mounting lost during sleep or what?

  • #2


    I thought this was a support forum where 4D experienced guys can give a helping hand. Do I have to start writing mails now to seek an answer to my problem?

    Comment


    • #3


      When the display goes into sleep mode, all peripherals are turned off.
      This has the effect of trashing any SPI or COMMS settings, which need to be re-established.
      An alternative way would be to implement your own sleep function by clearing
      the screen and polling touch in a loop, however, the current consumption would be slightly higher.
      Regards,
      Dave

      Comment


      • #4


        I have the uOLED32028, but isn't the System current substantially lower when sleeping, I seem to recall current draw being about 10mA sleeping, but like 70 - 90 when only the screen is off. I will retest, but for battery powered devices (like mine) this is a huge difference to typical operating time.

        Andy
        MicroLec Industries P/L
        www.intelligym.com.au

        Comment


        • #5


          yes Andy agreed, not very efficient that way.
          We'll do some brainstorming and see what can be done.
          Regards,
          Dave

          Comment


          • #6


            thank you all, now i know what needs to be done

            Comment


            • #7


              have to get back on this problem as I still can't get to the bottom of it

              I would need a little more detailed description of the "all peripherals are turned off" phrase please. after sleep I can see I2C communication for example is still running fine (without any other I2C_Open call).

              I noticed the file handles get trashed and the only workaround was some code like:

              sys_SetTimer(TMR_SysTick, 0);
              mem_Free(ImgHandle);
              file_Unmount();

              sys_Sleep(65535);

              file_Mount();
              ImgHandle := file_LoadImageControl(DAT_GRAPHS, GCI_GRAPHS, 1);

              touch_Set(TOUCH_ENABLE);

              sys_SetTimer(TMR_SysTick, SYSTICK);

              this seems to work fine for a while but eventually program still crashes after waking up from sleep. I've tried my best into debugging it but can't pin point the cause of it

              this is how i can describe: if program starts all works fine and i can get in and out of an external function without any issues. is program starts, goes to sleep then wakes up, i can get in and out the same external function a limited number of times until the program restarts, always when exiting the function and returning to the program

              I could sure use some more ideas or guidelines. What are ALL the functions that need to be taken into account for memory allocation and freeing before fileRun, fileExec, LoadFunction or even Sleep.

              I've read and re-read all the info's about this in the docs but I'm sure it's something that I'm missing here

              Comment


              • #8


                I posted a message with skeleton code for running multiple programs from a boot loader. in that one there is a heap of commented out stuff for tracking memory leakage.. I would be looking to see if there's a leak somewhere..

                goodluck.. please post your findings. I might need to know as well..

                Andy
                MicroLec Industries P/L
                www.intelligym.com.au

                Comment


                • #9


                  good u dropped by Andy I was actually "looking" for you. in one topic somewhere you mentioned about the file transfer issue between uLCD and a PC, saying you chose the way of serial connection and PC program that handles the files. Any chance you can make it public? Later on in my project I will need the same capability and it seems this is the only way to go. It would have been even better if 4D guys would have developed an "integrated" solution for this problem with the needed functions on 4DGL side and a simple program on the PC side

                  going back to my current problem, where can I find the post you mentioned? I will take a look on it but I did my own memory leakage tracking and so far nothing shows up

                  Comment


                  • #10


                    It would have been nice, however the solution for uploading files to the SD card is not trivial, and making a tool generic for everyone's use would have been a major coding effort for 4D systems.



                    http://4d.websitetoolbox.com/post/Max-program-size-5584076 has the skeleton code.. and I am pretty sure all the memory leakage stuff is commented out at the bottom.. it uses the EVE_SP() function which they developed recently I think for this type of debugging.. I thought there was more there.. hmmm..



                    My file upload code is heavily integrated into the rest of my PC communications protocol, and extracting the file upload content will take time and effort and I am busy enough as it is. PLus there is the PC-side application. Currently it is not a 'generic' protocol, meaning I always upload the same 5 files (programs) therefore don't have to worry about filenaming etc.



                    have a crack at it yourself, if you want to post some info in a new topic, I will help where I can..



                    Andy
                    MicroLec Industries P/L
                    www.intelligym.com.au

                    Comment


                    • #11


                      oh yeah, I remember now, Using mem_Heap() I think caused problems.. but 4D might have fixed this in the latest PMMC's...



                      Anyway, between EVE_SP() and mem_Heap() your should be able to find everything..



                      Andy..
                      MicroLec Industries P/L
                      www.intelligym.com.au

                      Comment


                      • #12

                        It would have been nice, however the solution for uploading files to the SD card
                        is not trivial, and making a tool generic for everyone's use would have been a
                        major coding effort for 4D systems.


                        Umm, isn't there code to do that in the v2_1 version of the SPE in the Picaso\SPE samples folder? (it is commented out, but IIRC it works the same as the SGC file transfer)
                        Mark

                        Comment


                        • #13


                          it is??? cool I will have to check it out.. what about the PC side? or is that part of the serial platform? I have only ever used 4DGL GFX, so have never spent time reading through the serial platform material.



                          THanks for the notice.. it might come in handy.



                          Andy
                          MicroLec Industries P/L
                          www.intelligym.com.au

                          Comment

                          Working...
                          X