This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PEC transfer complete

Is there a way to detect when the PEC transfer is complete.
I am using a continuous transfer method and decrementing the source pointer based on the initial PEC count.
Is an interrupt generated when no more bytes are needed to be sent.

Thanks for your help.

  • It appears from the datasheet that the EOPINT bit in the PEC Channel control register can be used in the continous transfer mode. It will generate an interrupt at the end of each PEC transfer. I have used the PEC but not in this particular mode so you will have to rely on the datasheet for the details. The Dave tool can also by handy for seeing how to configure the registers even if you don't want to use the code it generates.

  • Hi,

    PEC transfer can be either continous (COUNT loaded with 0xFF) or lasts until count is decremented to 0. When you really set the PEC to continous transfer you won't get any interrupt as the PEC controller will service it.
    If you set the COUNT-field to 1..0xFE, the PEC unit will decrement count. If count is decremented to 0 the request flag is not cleared by the PEC. Now a user supplied interrupt handler gets called. When called the PEC has already serviced the interrupt. The user written routine does some final processing or setting a completion flag or ...


    - Heinz