Tool/software:
Hello,
From my previous post (Found Here) I was under the impression that setting registers in the cpu was potentially much quicker than the CLA as the cpu had access to a larger instruction set. On that I notion I set my code to transfer PWM settings from the CLA to the CPU hoping to avoid the 8-10 cycles per instruction I was previously seeing. I need to set about 12 different registers so the additional clock cycles quickly add up. However, I found that when trying to set the PWM registers using CLA2CPU messages I was again seeing 8-10 cycles in the CPU now. Rather than try and debug the CLA code I found similar behavior with the below dummy code where the code on the left takes 3 cycles to set PHSDIR and the code on the right takes 8-10 cycles.
The left code sets a uint16 variable ('set_reset_bit') to 200, increments by 1, and then masks it to set the PHSDIR bit. The right code is a running uint16 counter ('set_bit_count') that increments and then masks to set the PHSDIR bit. Can you help me understand why the right code takes 3X longer?

