UC3 Capture timer bitstream trigger

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am using EVK1100 with UC3A and GCC compiler.

The app. is measuring a bitstream at the TIOA-pin, storing the RA-reg values in a table.

The capture timer is using two interrupt lines; RA load and timer overflow. RA load copies the content to the table and overflow stops the timer. When the app is started and is waiting for a bitstream, the overflow interrupt do nothing (else it would finish all time). The piece of code in the overflow interrupt is enabled by the RA-load interrupt.

So when app. starts and there are no pulses yet, RA-load must NOT occur before overflow. This is supposed to be the pulse trigger.

It works when board RESET button, but when i restart in software it seems like RA int occur first, even if I read RA immediately after re enabling the global int.!!

Any ideas, is this a proper way of implementing such trigger?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorted it! I spent the last hours figuring out that RA register cannot be written in timer capture mode. The data sheet is great to have when programming!