Skip to main content
jacktan1
Associate III
December 20, 2003
Question

ST7FLITE19: 2 important question need ANSWER

  • December 20, 2003
  • 3 replies
  • 775 views
Posted on December 20, 2003 at 05:34

ST7FLITE19: 2 important question need ANSWER

This topic has been closed for replies.

3 replies

jacktan1
jacktan1Author
Associate III
December 18, 2003
Posted on December 19, 2003 at 00:08

a)

DCRxH DCRxL are just ''preload PWMx DUTY CYCLE REGISTER'' not as described in user manual as ''PWMx DUTY CYCLE REGISTER''. So in case of OUTPUT COMPARE, if you set DCRx to some value, you just set the preload DCRx, the real DCRx are still equ to ''0x000'', the OUTPUT COMPARE doesnt work anyway! You have to TRANSFER them into DCRx by OVF set and TRANCR set. Am i right?

b)

if an IO pin is set to an interrupt input pin, and the sensitivity is ''falling edge only''. When a falling down signal happened, it will enter the interrupt service routine(''ISR''), and this is OK. But in the ISR, the signal changes from falling to rising and then to falling , then keep low. At this time, it exits the ISR by excutes IRET, the same interrupt occures again! Why?

Thanks

J.V.
jatin
Visitor II
December 19, 2003
Posted on December 19, 2003 at 07:53

1. The values in the DCRx goes into the shadow registers only at the OVF provided TRAN bit is set. Similar is the case with OPx bits.

2. It is the next pending interrupt.

[ This message was edited by: Jatin on 19-12-2003 12:24 ]
jacktan1
jacktan1Author
Associate III
December 20, 2003
Posted on December 20, 2003 at 05:34

refer to the 2nd question:

''...then keep low. At this time, it exits the ISR by excutes IRET, the same interrupt occures again!... ''

If a rising edge is insert again, and then keep high. At this time, it exits the ISR by excutes IRET, no interrupt occures any more.

How does it cancel the pending interrupt?

Thanks!

J.V.