Closed tdjastrzebski closed 1 year ago
ST Internal Reference: 121956
Hi @tdjastrzebski,
Thank you for your contribution. This issue has been fixed in the frame of version v1.10.6 of the stm32l0xx_hal_driver. Please allow me then to close this thread.
With regards,
HAL_ADC_Start_DMA()
method, the lastLength
param description reads:This is misleading. Param name and the description suggests data buffer length (bytes?) is required while number of conversions is expected.
This value is finally used to set
hdma->Instance->CNDTR
register (DMA channel x number of data to transfer register). According to docs "It is decremented after each single DMA ‘read followed by write’ transfer, indicating the remaining amount of data items to transfer."I think
HAL_DMA_Start_IT()
andDMA_SetConfig()
methods suffer from a similar documentation ambiguity.DataLength
param name is used whileDataLength
is not same as amount of data items. DataLength suggest number of bytes while number of data items (count) is expected.As far as I can tell, the problem exists in all HAL packages. HAL param names do not seem to use very consistent naming. Size and Length words are used interchangeably. In this case Count word would probably be a much better choice.