Datasheet

PIC24HJXXXGPX06/X08/X10
DS80280G-page 14 © 2008 Microchip Technology Inc.
40. Module: DMA
When the DMA channel is configured for One Shot
mode with NULL write enabled, the channel will
write an extra NULL to the peripheral register after
completing the last transfer. In the case of the SPI
module and the SPIxBUF register, this would
cause the SPI module to perform an extra receive
operation.
Work around
None. In the case of using DMA NULL write with
the SPI module, perform a dummy read of the
SPIxBUF register after the DMA transfer is
completed to clear the SPIRBF flag and prevent an
un-expected overflow condition on the next SPI
receive operation.
41. Module: REPEAT Instruction
Any instruction executed inside a REPEAT loop,
which produces a Read-After-Write stall condition,
results in the instruction being executed fewer
times than was intended.
An example of such code is:
repeat #0xf
inc [w1],[++w1]
Work around
Avoid repeating an instruction that creates a stall
using a REPEAT instruction. Instead, use a
software loop using conditional branches.