Hello,
so I bought this ADC (ADS7054) and got a STM32G431. Now I thought I can read the 1 MSPS ADC output with this microcontroller. I tried setting everything up with the conveniant help of the STM32CubeIDE. Since the ADC datasheet states that it is SPI compatible, I gave it a shot. But I can't figure out how to configure the microcontroller to give appropriate SPI signals (CLK, MISO, CS). The ADC only transmits data, so no MOSI line is needed.
I don't change the registers too much. Everything is is at reset except the following:
PA4: SPI1_NSS (Chip select)
PA5: SPI1_SCK (Clock)
PA6: SPI1_MISO (Data line)
The mode is set to be "Receive only Master", and the datasize is set to be 9 bit (since the ADC needs 18 clocks for the conversion, I planned on giving it 2 times 9 clock cycles). The Baud Rate is set to 8MHz (HSI clock divided by 2 (Baud prescaler)).
The problem I get is when I try to receive only 9 bits (9 clock cycles) I can see on my scope, that the STM32G431 generates sometimes 18 clock cycles or even more (always a multiple of 9 though)
I wonder about the feasability of the STM to control the ADC. What are your thoughts, any ideas what I could try ?
Also, a related but different question: I got myself this ADC and it needs a custom protocol. Is it reasonable to generate an SPI clock of 40MHz (to get the 1MSPS from the ADC) ? Or should I go with a FPGA in this case ? (or even something else, a dedicated IC ?)
Yet another question: is there a microcontroller with an integrated 16 or 14 bit 1MSPS ADC ?
-8
so I bought this ADC (ADS7054) and got a STM32G431. Now I thought I can read the 1 MSPS ADC output with this microcontroller. I tried setting everything up with the conveniant help of the STM32CubeIDE. Since the ADC datasheet states that it is SPI compatible, I gave it a shot. But I can't figure out how to configure the microcontroller to give appropriate SPI signals (CLK, MISO, CS). The ADC only transmits data, so no MOSI line is needed.
I don't change the registers too much. Everything is is at reset except the following:
PA4: SPI1_NSS (Chip select)
PA5: SPI1_SCK (Clock)
PA6: SPI1_MISO (Data line)
The mode is set to be "Receive only Master", and the datasize is set to be 9 bit (since the ADC needs 18 clocks for the conversion, I planned on giving it 2 times 9 clock cycles). The Baud Rate is set to 8MHz (HSI clock divided by 2 (Baud prescaler)).
The problem I get is when I try to receive only 9 bits (9 clock cycles) I can see on my scope, that the STM32G431 generates sometimes 18 clock cycles or even more (always a multiple of 9 though)
I wonder about the feasability of the STM to control the ADC. What are your thoughts, any ideas what I could try ?
Also, a related but different question: I got myself this ADC and it needs a custom protocol. Is it reasonable to generate an SPI clock of 40MHz (to get the 1MSPS from the ADC) ? Or should I go with a FPGA in this case ? (or even something else, a dedicated IC ?)
Yet another question: is there a microcontroller with an integrated 16 or 14 bit 1MSPS ADC ?
-8