Shop OBEX P1 Docs P2 Docs Learn Events
PASD on the Professional Prop Proto board — Parallax Forums

PASD on the Professional Prop Proto board

JackBakJackBak Posts: 45
edited 2009-10-15 03:45 in Propeller 1
In debugging some of my PASM code I noticed that if I load my code (with the proper PASD hooks in the code) into
either the Prop demo board or the Prop USB Proto board I can debug with PASD. Try the same on the Pro board
and I get the "no data - assembly code with Debug Kernel loaded in Propeller Chip?" message.

So I backed up and used the PASD_AsmDebugDemo code that comes with PASD. Same thing. The only difference
I see from Parallax's schematics from the FTDI USB chip is that on the Proto board Tx and Rx are directly connected
to P30 and P31 whereas on the Pro board both lines have a 150 ohm resister in series. This isn't the famous FTDI reset
issue is it? Oh and I double checked that I am connecting to the same COM port in PASD that the Prop IDE used to
download the code with.

Any help would be appreciated.

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2009-10-14 19:07
    Hello Jack,

    I tested it with my PPDB and did the steps in exactly the same order as the user manual recommends it

    1) Double click the PASD_AsmDebugDemo.spin module to load it into the Propeller IDE.

    2) Note: If you are working on a Hydra or target hardware
    other then the Propeler Demo Board then you must modify
    the _clkmode and _xinfreq settings to match your target
    hardware and establish an 80MHz clock. For the Hydra
    these setting would be:
    CON
    _clkmode = xtal1 + pll8x
    _xinfreq = 10_000_000

    3) Power on and connect your target hardware.

    4) Press <F10> to upload and run PASD_AsmDebugDemo.spin. NOTE: Do not close the Propeller IDE.

    5) Double click the PASD.exe executable to start it.

    6) In PASD, Select “Com Port” from the “COM” menu and specify your COM port.

    7) Make sure that the Propeller IDE is still open, and that the “PASD_AsmDebugDemo spin” window in the Propeller IDE is the currently active window.
    Press <F2> (or alternatively select “Get Asm Code” from the “File” menu)
    The main PASD window will update to show the source code for the module being debugged (PASD_AsmDebugDemo.spin).

    best regards

    Stefan
  • JackBakJackBak Posts: 45
    edited 2009-10-14 20:02
    Thanks Stefan,

    Yeah, isn't that weird I did all of that and it's like PASD can't talk to the PPDB yet I can down load
    the code via F10 from the IDE. As I said the PASD works with my code just fine if its NOT the
    PPDB so I think I've got all the steps down correctly.
  • AribaAriba Posts: 2,690
    edited 2009-10-14 21:07
    Does other code, which needs a proper Crystal frequency, work ? (i.e some Terminal Demos?)
    You get this message if the PASD-PC-Application can not communicate with the debugged cog. Possible reasons:
    - Wrong COM Port set in PASD
    - PASDebug object or Debug Kernel not included
    - Wrong Clock frequency set, or Clock does not work propper

    As you say the first 2 points shoud not be the reason, so I think it has something to do with the clock.
    If you have not changed the 5 MHz crystal, then perhaps the PLL of your Propeller chip not works anymore.
    The PLL is the first thing that breaks down if the Propeller is stressed by overvoltage or so. The internal RCfast
    oscillator still works, and downloading is therefore possible.
    You can check the PLL also with a code that blinks a LED with a calculated frequency (i.e 1 Hz @ 80MHz), if the LED blinks
    much too slow then the PLL not works.

    Andy
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-10-14 21:14
    Hello Jack,

    I tested it with my PPDB and it works with my PPDB. I mean Propeller Professional Development Board

    best regards

    Stefan
  • JackBakJackBak Posts: 45
    edited 2009-10-14 22:03
    @Stefan: Thanks for testing, I didn't think it was the 150 ohm resistors.

    @Ariba: Thanks. Below is the code I am testing with it is just stub code but I added a button push to light a LED
    for three seconds at 80MHz with PLL and if I comment out the dbg.start line we see the LED on for 3 sec.
    With dbg.start active pressing the button does NOT light the LED

    {{ test code }}
    
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
    '*****************************************************************************
    '  Global Definitions
    '*****************************************************************************
      _OUTPUT       = 1             'Sets pin to output in DIRA register
      _INPUT        = 0             'Sets pin to input in DIRA register
      _HIGH         = 1             'High=ON=1=3.3v DC
      _ON           = 1
      _LOW          = 0             'Low=OFF=0=0v DC
      _OFF          = 0
      _ENABLE       = true          'Enable (turn on) function/mode
      _DISABLE      = false         'Disable (turn off) function/mode
    
    '********************** L O C A L   C O N S T A N T S *************************
      BP            = 4             'Button pin
     
    OBJ
      dbg : "PasDebug"
      
    VAR
      long Cog
      
    PUB Main | Time
    
       dira[noparse][[/noparse]BP]~                                          'Input
       q_rpt := 0
       Cog := cognew(@entry, @q_pin) + 1
       dbg.start(31, 30, @entry)
    
      repeat
        if ina[noparse][[/noparse]BP] == _LOW                                  'on button push light LED
           dira[noparse][[/noparse]16]~~
           outa[noparse][[/noparse]16] := _HIGH
           waitcnt(cnt + (clkfreq / 1_000) * 3_000)         ' 3 seconds ON
           outa[noparse][[/noparse]16] := _LOW                                 'LED off
    
    DAT
                  org       0
    
    entry
    '  --------- Debugger Kernel add this at Entry (Addr 0) ---------
       long $34FC1202,$6CE81201,$83C120B,$8BC0E0A,$E87C0E03,$8BC0E0A
       long $EC7C0E05,$A0BC1207,$5C7C0003,$5C7C0003,$7FFC,$7FF8
    '  -------------------------------------------------------------- 
    :loop         test      q_rpt, #0
          if_z    jmp       #:loop                  'we will wait for something to do
            
                  movd      parmld, #pin            'fall thru as we apparently have work to do
                  mov       p, par
                  mov       j, #05
    parmld        rdlong    0-0, p
                  add       parmld, dlsb
                  add       p, #4
                  djnz      j, #parmld              'loop until we finish loading the parameters
    
                  mov       pmask, #1
                  shl       pmask, q_pin
                  muxnc     dira, pmask
    
                  
                     
    dlsb                    long    1 << 9
    
    q_pin   long  $0A
    q_pat   long  $A5         'data pattern
    q_win   long  $12         'window for pattern
    q_dly   long  $34         'delay until next repeat of pattern
    q_rpt   long  $00         'repeat count - if 0 driver loops waiting for non-zero
    
    '
    ' Unitialized data
    '
    p             res       1                       'parameter pointer
    j             res       1                       'counter
    pmask         res       1                       'pin mask
    
    pin           res       1
    pattern       res       1
    window        res       1
    delay         res       1
    repeat_cnt    res       1
    
    



    Even when I comment out the _clockmode and _xinfreq lines (which should put us in RCFAST mode) PASD still
    can't communicate with the PPDB.
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-10-14 23:31
    PASD requires _clockmode and _xinfreq

    if your PLL is damaged all _clockmode and _xinfreq are NOT working anymore
    The only thing that is still working is rcfast / rcslow

    but with rcfast or rcslow you CAN'T connect to PASD

    in other words if _clockmode and _xinfreq are NOT working anymore you CAN'T connect to PASD

    if you want to narrow down the problem you have to keep most things constant and working
    So to check if your PPDB can connect to PASD. Take a *.spin-file that is WELL KNOWN and TESTED to work with PASD

    Did you perfom a test with the file PASD_AsmDebugDemo.spin ?

    I tested your PASM-code. PASD steps through some of your PASM-longs and res ??? strange
  • AribaAriba Posts: 2,690
    edited 2009-10-15 00:02
    @JackBak

    I think I've found it. If the dbg.start methode blocks the whole code then it waits for a start byte from the PC-Application.
    So it seams that the COM port is the problem. I guess your Professional Development Board has a higher COM number than the Proto and DemoBoard.
    The Problem was that PASD uses an older syntax to open the COM-port which works only up to COM10 or 16 or so (don't know the exact number). Attached is the corrected version 0.5 of PASD (only the .exe). I hope this fixes your problem.

    @pjv

    I don't find the thread where you ask me for this feature, but this version includes also Watchpoints. These Watchpoints are Breakpoints with Auto-continue, so they just update the Viewer content and continue to run. To set such a Watchpoint, you need to select the Code column of the line and then choose 'Toggle Watchpoint' (or Shift-F9) from the Menu. Then it looks like a Breakpoint, but with green Text (deselect the Code column to see this). With 'Clear All Breakpoints' also these Watchpoints are cleared.

    Andy
  • JackBakJackBak Posts: 45
    edited 2009-10-15 00:19
    Thanks Ariba that did it. Interestingly, the older PASD failed on my system using COM8, but now works as it should with COM8.

    Thanks for the quick look into fixing this. When I got a 3 second LED I was pretty sure the PLL worked on my PPDB but good
    thinking so that we could rule it out.

    Regards,

    Jack
  • pjvpjv Posts: 1,903
    edited 2009-10-15 03:45
    Andy;

    I'm in Hawaii just now on vacation (rotten weather back home in Canada) and I will install the new version as soon as I get home.

    Thanks for dealing with this, it will be quite a help.

    Cheers,

    Peter (pjv)
Sign In or Register to comment.