Shop OBEX P1 Docs P2 Docs Learn Events
Debug issues — Parallax Forums

Debug issues

DiverBobDiverBob Posts: 1,108
edited 2021-03-18 21:31 in Propeller 2

I've been trying out the debug tool and ran into some questions.
With the following code:

  debug(`plot myplot size 400 400 backcolor white update)
  repeat
    debug(`myplot clear)
    debug(`myplot set 200 365 blue text 24 2 'Hexapod')
    debug(`myplot set 50 200 black line 50 325 5 100)
    debug(`myplot set 50 200 black line 100 250 5 100)


    debug(`myplot update  `dly(100))

I see this output on the terminal window

The display window shows up 'blinking' as it blanks out when the '!' shown in the terminal window comes up (see the 1st and 4th group of terminal text). You can also see where the text 'myplot' is changed. The '!' appears to indicate an error of some sort that isn't documented. I get the same results using the P2 Eval board and P2 Edge. The errors change for each debug line I put in, sometimes the whole window never comes up or is blank.
I couldn't get the text feature to work until I copied a debug line from one of the examples, pasted it into my code and then changed the text. If I just type in debug(`myplot set 200 365 blue text 24 2 'Hexapod') no text will show up.
I am able to run the P2_Plot_Eggbeater and other demos without errors. This is being run in Prop Tool 2.5.3.

Comments

  • Do you have some fullduplex stuff running in parallel? Or do you run debug in different COGs?

    For me it looks like you have some bit-errors during transmission.

  • @MagIO2 said:
    Do you have some fullduplex stuff running in parallel? Or do you run debug in different COGs?

    For me it looks like you have some bit-errors during transmission.

    No serial ports are open, just keeping it simple.

  • The code above works for me.

    Which P2 board do you have, which serial interface do you use? Maybe there is some connection issue?

  • cgraceycgracey Posts: 14,151

    These are data-receive errors on the PC side.

    Can you run this in PNut? In all of my work, when I overrun the buffer, I get problems like this. Eventually, the PC will handle everything correctly because Jeff's serial routines are running in separate threads. We may have some issues, yet.

    I am pretty certain that the P2 is sending the data out correctly. The PC is just not getting it properly.

  • I changed the clock frequency to 200Mhz and now it’s holding steady, no errors showing up with the slower frequency.

Sign In or Register to comment.