Announcement

Collapse
No announcement yet.

Program will not start when on USB power only

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

  • Program will not start when on USB power only

    I have a working program. While the Workshop 4 is running and connects, I can unplug the pixxi and plug it back in and it will start, I do see uart lights blink when plugging it in.

    If I plug the device into a USB power adapter or my laptop and the development tool is not running, the program does not start. What am I doing wrong?

    Thank you,
    Michael

  • #2
    Hi Michael,

    Welcome to the Forum,

    Could you please click on the Project Tab and check to see if the Destination is set to Run RAM. If it is, set it to Run Flash and then try re-flashing the Pixxi.

    Please let me know if this works out for you.

    Best regards

    Paul

    Comment


    • #3
      Click image for larger version

Name:	4d.png
Views:	56
Size:	70.0 KB
ID:	74412Destination is set to flash already...file system has nothing selected.
      Last edited by [email protected]; 6 December 2020, 01:51 AM.

      Comment


      • #4
        I will re-flash and force a recompile. Earlier I had some issues with the program not updating after small changes.

        Comment


        • #5
          OK. I recompiled and deployed. Here's the scenario:
          1. Unplug pixxi
          2. Shutdown Workshop
          3. Plug pixxi back into laptop...back lighting comes on but program does not start
          4. Start workshop but do not load project...program starts

          Ideas?

          Comment


          • #6
            Here's my code if that will help. Additional issue I am running into is that if I let the pixxi sit running, eventually it becomes unresponsive until I cycle power.

            #platform "pixxiLCD-13P2CT-CLB"


            // Program Skeleton 1.5 generated 12/4/2020 12:51:25 PM

            // #MODE RUNFLASH uncomment and set Destination to Flash to run from Flash, refer 4D-AN-00055

            #inherit "4DGL_16bitColours.fnc"

            #inherit "VisualConst.inc"

            // var gradientRAM[29+xxx*2] := [-1,-1,-9999,0,0,xxx] ; // uncomment and replace xxx with maximum of all inherent 'media' widgets

            #inherit "RealVideoConst.inc"

            var frame;
            var x, y ;

            func main()
            var state, n, degrees, zero, posit;
            touch_Set(TOUCH_ENABLE);

            if(!media_Init)
            putstr("Flash Memory Initialized");
            endif
            gfx_Cls();


            hndl := file_LoadImageControl(0, 0,3);
            img_SetWord(hndl, iVideo1, IMAGE_INDEX, 0) ;
            img_Show(hndl,iVideo1) ;

            repeat
            state := touch_Get(TOUCH_STATUS); // get touchscreen status
            n := img_Touched(hndl,-1) ;

            //-----------------------------------------------------------------------------------------
            if(state == TOUCH_PRESSED) // if there's a press
            x := touch_Get(TOUCH_GETX);
            y := touch_Get(TOUCH_GETY);
            endif

            //-----------------------------------------------------------------------------------------
            if(state == TOUCH_RELEASED) // if there's a release
            putstr("Touched...");
            frame := 0;
            while(frame < 8)
            img_SetWord(hndl, iVideo1, IMAGE_INDEX, frame) ;
            img_Show(hndl,iVideo1) ;
            frame++;
            wend
            endif

            forever
            endfunc

            Comment


            • #7
              I did uncomment this and deployed...no change in behavior.
              #MODE RUNFLASH

              Comment


              • #8
                Hi Michael,

                This is really odd.

                I have noticed on Line 23. It should be this.

                if(media_Init())

                And the File system should be set to Flash also.

                Comment


                • #9
                  More information. I have placed diagnostic putstr's to see where the device stops. If powered up and WorkShop is not running, the last debug string logged is putstr("...........1......");

                  Code:
                  #platform "pixxiLCD-13P2CT-CLB"
                  
                  
                  // Program Skeleton 1.5 generated 12/6/2020 3:08:22 PM
                  
                  #MODE RUNFLASH //uncomment and set Destination to Flash to run from Flash, refer 4D-AN-00055
                  
                  #inherit "4DGL_16bitColours.fnc"
                  
                  #inherit "VisualConst.inc"
                  
                  // var gradientRAM[29+xxx*2] := [-1,-1,-9999,0,0,xxx] ; // uncomment and replace xxx with maximum of all inherent 'media' widgets
                  
                  #inherit "VerySimpleTestConst.inc"
                  
                  func main()
                  var frame;
                  var x, y ;
                  var state, n, degrees, zero, posit, hndl, iVideo1;
                  hndl := 0;
                  iVideo1 := 0;
                  touch_Set(TOUCH_ENABLE);
                  
                  if(media_Init)
                  putstr("Flash Memory Initialized");
                  endif
                  pause(2000);
                  gfx_Cls();
                  pause(2000);
                  putstr("...........1......");
                  
                  hndl := file_LoadImageControl(0, 0,3);
                  putstr(".............2.......");
                  img_SetWord(hndl, iVideo1, IMAGE_INDEX, 0) ;
                  putstr("3.......");
                  img_Show(hndl,iVideo1) ;
                  putstr("4.......");

                  Comment


                  • #10
                    You still haven't fixed the media_Init() as suggested by Paul above
                    Mark

                    Comment


                    • #11
                      Sorry, I saw the change of the ! operator and completely overlooked the (). That has fixed it. Thank you.

                      Two additional questions:
                      1. Who would I speak to to get a quote for the 32MB of the 13P2CT?
                      2. Has anyone built or provide a back for the 13P2CT that gives just enough room for a battery?

                      Thank you for your support,
                      Michael

                      Comment


                    • #12
                      And the media_init() change did fix the issue.

                      Comment

                      Working...
                      X