2024-04-21 11:22 PM
Sorry, I have another question to ask everyone. I'm currently using the Nucleo F429ZI with SPI interface to receive 12-bit encoded data from another ADC. The Vdrive of that ADC can provide 3.3V or 5V for driving. However, the high level of the STM32F429ZIT6 is 3.3V. If I want the SPI high level to be 5V, what methods can I use to achieve this?
Originally, I was researching GPIO's Open Drain to use an external 5V to accomplish this, but in CubeIDE, the SPI is set to Push-Pull. So I would like to ask, when using STM32, how can I achieve a 5V high level if the SPI requires it?
2024-04-23 05:46 AM
Most 5 Volt logic inputs have a specification of 0.7 * VCC = 3.5 Volt for an input to be recognized high. An output from a 3.3 Volt device however is recognised as high nearly in all cases. There are two cases were I would place a 3.3-5 Volt level translator:
1. If minimum quiesent current is needed. At 3.3 Volt the input buffer of the 5 Volt device will draw "substantial" current
2. The device is sold commercial and some ppm non-functional devices is inacceptable
There are 3.3 -> 5.5 Volt level translators, e.g. 74LVC1T45
2024-04-23 07:01 AM - edited 2024-04-23 07:49 AM
Ok, so for 3v3 -> 5V level , can use AHCT types, like: 595-SN74AHCT1G86DCKR (mouser, 20ct );
at VDD 5V , for this gate of course . (I use it also for this 3v3 -> 5V conversion at hi speed.)
at 2ns/div:
2024-04-23 07:33 AM
I am currently focused primarily on processing speed.
74LVC1T45 can convert 5V to 3.3V, but it may not interpret 3.3V as a high voltage and output 5V.
2024-04-23 07:46 AM
Got it, I'll test it using this method. Thanks.
2024-04-23 08:36 AM - edited 2024-04-23 08:45 AM
Hello,
What is the part number of that ADC? Keeping the IOs as output push-pull, you don't have to add any external hardware if VIHmin (ADC IOs) < VDD of your MCU.
Most of STM32 IOs are 5 volt tolerant. You need just to check the pin (FT or not).
You can attach the ADC datasheet so we can confirm.
2024-04-23 09:32 AM
@Scarlet wrote:I am currently focused primarily on processing speed.
You actually seem to be focussing on transfer speed rather than processing speed ?
:thinking_face:
To improve the overall application performance, can you start processing the early data before the transfer has completed?
2024-04-23 09:34 AM
74LVC1T45 has dual supply voltage nad so it can do 3.3V to 5 v with a 3.3 and 5 Volt supply.
2024-04-23 06:22 PM
I used the ADC is AD7366[1].
If I want to use a higher SPI frequency, I need to provide Vdrive 5V, but the MCU output high is 3.3V, which is less than 0.7 * 5V ADC input high voltage.
[1] AD7366 datasheet
2024-04-23 06:55 PM - edited 2024-04-23 06:55 PM
Looking at the ADC’s datasheet page 4, VINH min = 0.7 x Vdrive = 3.5V > VDD MCU. So indeed you need to adapt the voltage of the IO externally in the direction from STM32 to the ADC.
2024-04-23 09:32 PM
This is my current architecture:
You actually seem to be focussing on transfer speed rather than processing speed ?
The processing time include
1. Tick MCU
2. MCU to ADC check
3. ADC convert
4. SPI serial read time
5. MCU output 12bit ADC data
This is the time it currently takes for the MCU to obtain ADC 12-bit information:
Blue is CNVST, Yellow is SCK
So, SPI transfer time only the part of processing time.
To improve the overall application performance, can you start processing the early data before the transfer has completed?
I plan to experiment with various methods to reduce processing time.
e.g. DMA, to determine if data acquisition time can be reduced without involving instructions and the CPU