Forums

PWM in Scope

Started by Ron McDonald November 15, 2002
I'm using the 56f805 to generate a PWM and i'd like to know how i can
get the waveform in the scope. I'm a newbie, and i don't know which
variable to use, or if i have to make a call from pwmdrv.h. Thanks in
advance - Chris Austin



I'm not really sure what you mean by "get the waveform in the scope". To me, it
could mean either:

1) You want to look at the PWM waveform using an oscilloscope, or
2) You want to be able to look at the values in the PWM registers.

---------------------------------

If it is #1 above, and you are using the DSP56F805EVM module, you can find the
pinouts of the connectors by looking in the on-line documentation from Motorola,
start it as follows:
Start
Programs
Motorola
Embedded SDK 2.5
Help and Documentation
In "Contents", go to:
Motorola Embedded SDK
DSP56800/800E Processors
Evaluation Boards
DSP56F805EVM
You can now find the pins for the PWM output you are using, and connect the
oscilloscope to them.

---------------------------------

If it is #2 above, you can make a pointer to the on-chip peripherals as follows:

// (in your Global data area):
// Pointer to the ArchIO structure (on-chip peripherals)
arch_sIO *p_ArchIO;

// (somewhere in your startup code, maybe in the main() function):
// Point to the ArchIO structure (on-chip peripherals)
p_ArchIO = ( arch_sIO * )&ArchIO;

Now, when you stop the program (for example, at a breakpoint), you can
open the Global Variables window and look at the values in the ArchIO
structure by clicking on the p_ArchIO variable. The ArchIO structure
contains structures for all the on-chip peripherals as shown below:

typedef volatile struct{
arch_sSIM Sim;
UWord16 Reserved1[240];
arch_sTimer TimerA;
arch_sTimer TimerB;
arch_sTimer TimerC;
arch_sTimer TimerD;
arch_sCAN CAN;
arch_sPWM PwmA;
arch_sPWM PwmB;
arch_sDecoder Decoder0;
arch_sDecoder Decoder1;
arch_sIntCntrl IntController;
arch_sADC AdcA;
arch_sADC AdcB;
arch_sSCI Sci0;
arch_sSCI Sci1;
arch_sSPI Spi;
arch_sCOP Cop;
arch_sFlash ProgramFlash;
arch_sFlash DataFlash;
arch_sFlash BootFlash;
arch_sPLL Pll;
arch_sPort PortA;
arch_sPort PortB;
arch_sPort Reserved;
arch_sPort PortD;
arch_sPort PortE;
} arch_sIO;

The arch_sIO structure is defined in the Motorola SDK file "arch.h", in
the following directory (for the '807 chip):
...\src\dsp56807evm\nos\include

The location of the ArchIO structure is defined in the "linker.cmd" file
as follows (for the '807 chip):
.xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
FArchIO = ADDR(.xPeripherals);

This address is defined to be the DSP on-chip peripherals at the end of
the "arch.h" file:
/* The locations of the following structures are defined in linker.cmd
*/
EXPORT arch_sIO ArchIO;
EXPORT arch_sCore ArchCore;

You can see the values in the PwmA and PwmB registers by clicking on the PwmA
and PwmB structures inside the ArchIO structure, which was displayed when you
clicked on the p_ArchIO variable.

---------------------------------

If what you want to know is not either of #1 or #2 above, then you should
clearly describe, in plain English, the information you would like to receive.

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com -----Original Message-----
From: Ron McDonald [mailto:]
Sent: Friday, November 15, 2002 8:59 AM
To:
Subject: [motoroladsp] PWM in Scope I'm using the 56f805 to generate a PWM and i'd like to know how i can
get the waveform in the scope. I'm a newbie, and i don't know which
variable to use, or if i have to make a call from pwmdrv.h. Thanks in
advance - Chris Austin
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/