9 years, 6 months ago.

14 bit SPI with STM32F4

Hi,

Can I obtain a 14 bit clock out an SPI port on an STM32F4?

I only get multiples of 8, but the ADC I'm using requires exactly 14 edges. And SWSPI is not an option due to its slow refresh period.

Thanks,

Jimi

Which platform is STM32F4? I am not familiar with all labels, sorry :)

posted by Martin Kojtal 30 Oct 2014

Nucleo boards F401 or F411 can only set 8 or 16 bit spi. Which adc part numb?

posted by Geremia G 30 Oct 2014

Thanks for the reply guys. The STM32F401RE on a Nucleo. The ADC I'm using is an AD7367, the first 14 clock edges clocks out the data from one channel while the data from the second channel is clocked out in the next 14 clock edges. Currently I have solved the problem with the not so elegant solution of reading 16 bits and right shifting the result by 2 bits. This seems to work and I guess there is no another way if it doe not support 14 bit HW reads.

Thanks

posted by Jimi Minton 31 Oct 2014
Be the first to answer this question.