Getting Debug to work?
Kirk Fraser
Posts: 364
The Prop and memory chip work, now it's my software. I've put together routines from the obex BS2 attempting to minimize the code needed for RCTime and PWM for testing to make certain they work for me. First I need to get DEBUG to work with the serial screen so I can interact and see what's needed. I've loaded the program into EEPROM but nothing happens even when I enable the serial terminal in advance, it only says waiting for busy port for a few seconds then quits doing anything. In my understanding it should put up the pin request message right away. Am I not doing something to start the initial code? Thanks.
Comments
EDIT: You also need to define _clkfreq and _clkmode. It's nomally defined for 80 MHz as follows:
The actual mode and frequency may be different depending on your hardware.
And you should put a waitcnt(clkfreq*3+cnt) before your first print to give you enough time to enable the Prop terminal.
Is there a good example with all the debug details? Thanks. I'll eventually want to report numbers as well as text like on the BS2 debug.
Ediit: It works with your edit! Thank you!
I always use
chrystalfrequency and pllfactor
If you receive "gibber" what type of propellerboard are you using?
sending serial data is sensitive about exact timing
you must have a chrystal and the constant _xinfreq must match the chrystals frequency
some boards have a 8MHz or 10MHz chrystal. So please post the kind of board and - if you know - the chrystalfrequency.
then setup the right value in the constant-section for _xinfreq
best regards
Stefan
The board is a "3M Solderless Breadboard" and the circuit is as described on page 27 of "Propeller Education Kit Labs: Fundamentals." The crystal I use is the special 6.25 MHz unit available from Parallax to enable 100 MHz operation which is considered a safe maximum.
clkfreq is stored at location zero, and can also be accessed as long[0]. It generates the same bytecodes either way.