ADC Buffer Size and DMA
I've been diving in various rabbit holes and I've come to the issue of alignment and pointers. Thus, I enabled -Wcast-align. It has flagged the HAL for the ADC DMA startup here
static uint16_t adc_buffer[ADC_BUF_SIZE];
HAL_ADC_Start_DMA(hadc, reinterpret_cast<uint32_t*>(adc_buffer), 6);This is due to the fact that my buffer is a 1/2 word array but this DMA function accepts only a word array. Yet, I've told the DMA that I am using 1/2 words so it knows how to perform the access. And I think this type of cast will be OK even for alignment issues since 16 bit access will always be aligned on 16 bit or 32 bit buffers.
So is this a case of knowing that it should be fine and disabling the warning here?

