cancel
Showing results for 
Search instead for 
Did you mean: 

Hardware and software reference

gr8daniel
Associate

Hi, STM32H743 development kit to develop my board.

I want to develop my board in a way that each hardware interface can be selected between AI, AO, DI, DO by software. Is there any reference boards or reference documentations to implement such applications? For example, I have four interfaces, and sometimes I want to set one of the interfaces to AO, but later I want to change the interface to DO by setting software parameter. Is there any such reference implementation?

5 REPLIES 5
STTwo-32
ST Employee

Hello @gr8daniel and welcome to the ST Community :smiling_face_with_smiling_eyes:.

each GPIO pin in the STM32 MCUs can be configured as digital output, digital input, analogue input (converted internally using internal ADC) or alternate function (SPI_MOSI, UART_TX, ...) one off those alternate function is the DAC (alternate function is called DAC_OUT) wish gives an analog voltage signal outputs. For example, in the STM32H743 you can use both PA5 and PA6 as DAC1_OUT1 and DAC1_OUT2.

For more details, You can refer to the MCU reference manual and datasheet to understand how it works.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


@gr8daniel wrote:

each hardware interface ...

Not sure what you mean by that? Do you mean each pin ?

 


@gr8daniel wrote:

... can be selected between AI, AO, DI, DO

Also sure what you mean by that? "AI" = Analogue Input; "DO" = Digital Output; etc ?

gr8daniel
Associate

Yes, I mean Analog Input by AI, Analog Output by AO, Digital Output by DO, and Digital Input by DI respectively. Yes, I mean the pins by Interface, but I'll have terminal blocks connected to some pins in my application, so I can't change the pins physically anymore. So I want to change the function of the interface (pins if you prefer) by changing the software configuration. But as you know well, But Analog interfaces requires ADC and DAC in designing hardware. I want to know how to implement this application in terms of design of hardware and software. I may spend a lot of time figuring out the solution happily if I am in a normal course of life, but I have a very urgent and mission critical development project. So I just wanted to know if there is any design reference in any of STM development board for this application along with a working or proved solution. 


@gr8daniel wrote:

 Analog interfaces requires ADC and DAC in designing hardware.


Indeed. As @STTwo-32 said, these are available as "Alternate Functions".

The Datasheet for your device will tell you which pins have analogue functions available;

The Reference Manual has full details of programming/configuring everything.

There's the HAL and STM32Cube IDE to help you.

https://www.st.com/en/microcontrollers-microprocessors/stm32h743-753.html

See the Product Page for your device for all the documentation & other resources; eg,

https://www.st.com/en/microcontrollers-microprocessors/stm32h743zi.html

 


@gr8daniel wrote:

 I'll have terminal blocks connected to some pins in my application


and you're sure that the same conditioning/protection circuitry between the MCU pin and the terminal block is going to work for both "analogue" and "digital" signals?

:thinking_face: