Other Parts Discussed in Thread: HALCOGEN,
I was willing to use N2HET2_0 as clock source 1 of the DCC2 to verify my PWM. I was checking why it wasn't working and I realized that the generated code by HALCOGEN (04.06.01) is not corrected. See the code below:
VCLK as clock source 1 :
dccREG2->CNT1CLKSRC = (uint32)((uint32)10U << 12U) | /** DCC Enable Key */
(uint32) DCC2_CNT1_VCLK; /** DCC2 Clock Source 1 */
N2HET2_0 as clock source 1:
dccREG2->CNT1CLKSRC = (uint32)((uint32)10U << 12U) | /** DCC Enable Key */
(uint32) DCC2_CNT1_N2HET2_0; /** DCC2 Clock Source 1 */
As you can see, the define is changed correctly, but the DCC enable key is generated for both which is incorrect by the RM48L952 device description Table 6-18. DCC2 Counter 1 Clock Sources (page 74). I changed the value manually to remove the DCC enable key for N2HET2_0 and now everything is working.
Kind Regards,
Thiago Esteves