I have ported my application to the ADI API (drivers & services). During the initialization of the PCG component I have seen that function adi_pcg_FsPhaseShift() (SHARC\lib\src\services\Source\pcg\adi_pcg_v1.c) uses 5 bit maks to divide the phase shift value into a low and high part. Instead of using a 5 bit mask a 10 bit mask should be used due to the fact that the phase shift value is 20 bit wide.
/* mask off the low 5 bits */ HighValue = (FsPhase & 0x3E0u) >> 5u; /* mask off the upper 5 bits */ LowValue = (FsPhase & 0x1Fu);
/* mask off the low 10 bits */ HighValue = (FsPhase & 0xFFC00u) >> 10u; /* mask off the upper 10 bits */ LowValue = (FsPhase & 0x3FFu);
/* mask off the low 10 bits */
HighValue = (FsPhase & 0xFFC00u) >> 10u;
/* mask off the upper 10 bits */
LowValue = (FsPhase & 0x3FFu);
Am I right?
Moving to CrossCore Embedded Studio and Add-ins
Hello,We have logged this issue in our database,which is fixed in Release version CCES 2.9.0.You can download CCES 2.9.0 in the following link:
thanks - I have taken a look into the source file and it is fixed (but the comment still mentions the 5 bit ;)).