This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: Misleading HALCoGen comments in mapClocks() for CDDIS

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hi,

While reading the code generated by HALCoGen 04.06.00 after tinkering with the GCM panel, I noticed the comments for the code setting the value of CDDIS are misleading.

/**- Disable / Enable clock domain */
systemREG1->CDDIS = (uint32)((uint32)0U << 4U ) /* AVCLK 1 OFF */
                  | (uint32)((uint32)1U << 5U ) /* AVCLK 2 OFF */
                  | (uint32)((uint32)0U << 8U ) /* VCLK3 OFF */
                  | (uint32)((uint32)0U << 9U ) /* VCLK4 OFF */
                  | (uint32)((uint32)0U << 10U) /* AVCLK 3 OFF */
                  | (uint32)((uint32)0U << 11U); /* AVCLK 4 OFF */

Whether the clock domains are enabled (bit set to 0 - all except VCLKA2 in my example) or disabled (bit set to 1 - VCLKA2 in my example), the comments always state that the clock domain is OFF.

Regards,

Bastien Continsouzas

  • Bastien,

    I understand your concerns; however, the comment is intended to capture the function of the bit. Given that being set to 1 disables or turns it off, this is what was chosen as a comment/label for the bit similar as with a bit that is used to enable is labeled as "FUNCTION X ENABLE" even though it is realistically both enable and disable of "FUNCTION X." So I think this might be a simple matter of viewpoint. However, I will forward your concerns to our HalCoGen team so they can take it under advisement and consider updating to make it more clear.
  • Hi Bastien

    Sorry for the misleading comments, we will fix in upcoming release. 

    To clarify, 0 is ON or Enable, 1 is when clock domain is disabled.