xdp512 pwm issue

View: New views
2 Messages — Rating Filter:   Alert me  

xdp512 pwm issue

by Robert-327 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I can usually muddle through on debugging issues but I can't figure this
one out and would appreciate it if anyone has seen something similar and
can offer some advice.  In my test program the PWME bit I have set is
getting cleared unexpectedly when I call a sci routine to read an input
buffer.   The  PWME register is cleared after executing the first
instruction of the sci routine.  I'm stumped.  In the following  NoICE
screen dumps you can see address 0x300 (PWME) change from 0x04 to 0x00
after the sci call.  The only thing I can think of is that the page
switch is causing grief.  My compiler is ICCV712.

pwm_err_0.jpg <http://www.robmilne.ca/webfm_send/50>
pwm_err_1.jpg <http://www.robmilne.ca/webfm_send/51>

-rob



[Non-text portions of this message have been removed]


Parent Message unknown Re: xdp512 pwm issue

by Robert-327 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I can usually muddle through on debugging issues but I can't figure this
one out and would appreciate it if anyone has seen something similar and
can offer some advice. In my test program the PWME bit I have set is
getting cleared unexpectedly when I call a sci routine to read an input
buffer. The PWME register is cleared after executing the first
instruction of the sci routine. I'm stumped. In the following NoICE
screen dumps you can see address 0x300 (PWME) change from 0x04 to 0x00
after the sci call. The only thing I can think of is that the page
switch is causing grief. My compiler is ICCV712.

pwm_err_0.jpg <http://www.robmilne .ca/webfm_ send/50>
pwm_err_1.jpg <http://www.robmilne .ca/webfm_ send/51>

-rob

I solved this and removed the original post - I hoped the email packager
would ignore it since it was only up for 1/2 hour.  As most bugs are in
retrospect it was a 'stupid' bug.  I forgot that I had an ISR monitoring
the optical encoder for no movement and it disabled the pwm (I was
testing pwm independent of any motor feedback).  As luck would have it,
the write to PWME coincided with a page switch.


[Non-text portions of this message have been removed]