2015-06-05 12:41 AM
Hello
If i want to connect output of an ADC(analog to digital converter) to two different ports, e.g. GPIOA and GPIOB, and to modify this selection by means of software code(no hardware modification needed), how is it possible?Is it adequate to connect ADC output to all of the intended pins and choose desired channel by modification of GPIO pins mode(input/output)?Thanks.2015-06-05 07:00 AM
May configuring the unused(undesired) port pins in input floating mode be a solution, any other idea?
2015-06-05 08:04 AM
An external ADC? I'm not sure I follow your logic here, or what the problem is.
You can code software to do a host of things, for the internal ADC you can select which channel (pin) you want to convert.2015-06-05 08:14 AM
ADC channels are made for that. Pins are fixed but there are like 12 of them! Check the datasheet pinouts.
To configure use alternative function mode. There are examples in libraries.2015-06-05 09:03 AM
I try to clarify my problem:
I should connect digital output of a 60Msps ADC to two different ports, one of them as a gpio and the other in alternate function mode.If i want to use port1(e.g. GPIO) at a time, isn't there any concern about the other port that is connected to the bus?how should it be configured to avoid any interaction with active port?Is any need for analog switches or multiplexers?2015-06-05 09:13 AM
60Msps seems a bit high
If you have a digital signal coming into the STM32 via two pins, you'd really want both in ''input'' mode, either explicitly configured as such, or in AF mode where the peripheral is expecting the pin to be an input. ie USART1_RX2015-06-05 11:13 AM
I think this is helpful:
http://www.eevblog.com/forum/microcontrollers/gpio-port-on-fly-selection-mechanism/
2015-06-05 11:41 AM
Perhaps, but I honestly don't see how your method is going to function in a remotely useful/practical way. Thought about reading via the DCMI, or a FIFO device attached thereto, it's rated at 54 MHz?
Think about the problem you're *actually* trying to solve, and solve that.The data has to go somewhere, and you need to be able to process it.