Closed tdjastrzebski closed 10 months ago
Hi @tdjastrzebski,
Thank you for this report. From what I see, there is no need to shift the value of UCPD_InitStruct->psc_ucpdclk
before the assignment.
Indeed, the possible values taken by UCPD_InitStruct->psc_ucpdclk
are already shifted.
This is not the case for the other attributes like UCPD_InitStruct->transwin
that are meant to take values "between Min_Data=0x1 and Max_Data=0x1F" that are not shifted, thus requiring the shift operations.
I hope this makes things clearer. Please allow me to close this issue in this case.
With regards,
UCPD_InitStruct() function is missing value lshift is:
UCPD_InitStruct->psc_ucpdclk
should be:(UCPD_InitStruct->psc_ucpdclk << UCPD_CFG1_PSC_UCPDCLK_Pos)
since UCPD_CFG1_PSC_UCPDCLK_Pos != 0Btw, PSC_UCPDCLK name is inconsistent with registry description (RM0456 section 74.8.1) - see https://github.com/STMicroelectronics/cmsis_device_u5/issues/1