2022-11-01 08:25 AM
I realized that I would need continuously switching the GPIO pin for external MUX.
So, I want to know how to program continuously switching a GPIO pin (with a specific frequency and start timing for synchronizing with other GPIO pins)
However, If I on/off the GPIO pin with a delay, the timing doesn't match well.
So, is there any way to generate a frequency in a GPIO pin without any extra order such as DMA (it means that the GPIO pin just generates some signal without extra on/off control from the processor).
Is it possible? then what code should I use?
Solved! Go to Solution.
2022-11-01 08:50 AM
For this purposes is designed timers channels. Read en.STM32L4_WDG_TIMERS_GPTIM.pdf or any other. On your MCU you need use pin with alternate function TIMx CHy. And config ARR period and CCy duty.
2022-11-01 08:50 AM
For this purposes is designed timers channels. Read en.STM32L4_WDG_TIMERS_GPTIM.pdf or any other. On your MCU you need use pin with alternate function TIMx CHy. And config ARR period and CCy duty.
2022-11-01 08:50 AM
Don't the TIM do that?
2022-11-01 08:58 AM
I have to control 35 GPIO pin for the 32x32 photodiode array for the image sensor array. I'll check TIM again but I'm not sure whether I can use TIM for 35 GPIO pin.
2022-11-01 09:00 AM
Thanks for response.
I'll check the document!!
2022-11-01 09:05 AM
Strikes me you're using the wrong hardware for the task, perhaps you and your team can re-evalutate your approach?
You can use DMA+TIM+GPIO to drive a memory based pattern buffer against a bank of GPIO pins. Perhaps different DMA off alternate channels of one TIM to keep the phase relationships relatively tight.
2022-11-01 09:24 AM
Yes. I'm the only guy involving this project. I'm also making the physical 32x32 flexible image sensor also.
Speed is one of the big concerns. Right now. The problem with my system is the current sense amplifier that is connected to the ADC because its operating frequency is ~20 us (it means about 5 ms required for one sheet image -> I'm using four ADC channel and 4 amplifier components). I'm finding high-speed transimpedenace amplifiers (some product is possible in the texas instruments with ~5 ns but there is no vender.)
I can change some products based on these experiences and I will have a chance to change components. My final application is bioimplant cortex scanner. So, wireless is also essential. That's way I'm choosing this product.
2022-11-01 09:26 AM
Which STM32 is being considered?
2022-11-01 09:37 AM
I'm using STM32WB55VGY6TR.
I've already made my custom board and I successfully programmed the microcontroller for wireless data transfer.
The only problem now is measuring part of the sensor such as ADC, amplifier, and MUX for multiple channels.
2023-11-15 07:01 PM
I'm trying this one now. Is there any example I can follow?