2023-05-12 08:11 AM
Hi All,
I am using the STM32H723 device and have 8 GP outputs going out to a GreenPAK device to set the exact bit delay and muxing the outputs per the customer configuration. Due to the nature of the application, I cannot afford to integrate the logic in the interrupt event as I need as much speed as possible. Is there a way to set the GP outputs and then float the outputs immediately after so that the GreenPAK device can sense the positive edge and then drive the signal/s low? I basically want to take control of the pins after it leaves the STM32H723 device. How can I do this? Any help is greatly appreciated.
Thanks,
Eric Norton
2023-05-12 12:11 PM
Configure the GPIO pins are open-drain outputs. Enable the interal pull-ups if you do not have external pull-up resistors on those lines. Write "0" to th epins to drive them low. Then write a "1" to the pins to "float" them high. The external device can then drive them low whenever it wants and won't conflict with the STM32 pin states. This works better if all 8 pins are on the port (GPIOA, for example). And depending on your board design, the STM32's internal pull-ups may not give you a fast enough rise time (I have no idea what your GreenPAK device is looking for).
2023-05-12 12:15 PM - edited 2023-11-20 05:35 AM
you can write direct to port set registers, this is fastest way to change outputs.
ports are on AHB4 , at 200MHz bus clk and higher cpu clk can expect 5ns action on port.
( highest speed setting, optimizer on , -O2 os -Ofast , prefetch and caches ON )
and just set outputs as you like and then set mode register to -> input. (tri state output)
write access example : GPIOB->MODER = 0x080E ;
2023-05-12 12:27 PM
> at 200MHz bus clk and higher cpu clk can expect 5ns action on port.
In 'H7, writing from processor? Hardly so.
Btw. I have no idea what is the original request all about. Any timing diagram, block diagram, pseudo-schematics?
JW
2023-05-12 03:21 PM
Hi Bob,
Ahh ok, I will configure the outputs as open-drain and may need to use external pullups because I may need to tune the resistors due to the speed.
Funny you should mention GPIOA as I am using bits 0-7 for the first group and 8-15 for the second group. I am driving them like so:
uint16_t drive_port;
LL_GPIO_WriteOutputPort(GPIOA, drive_port);
Calling the low-level function works well for my purposes for push-pull output configuration and hope it will work well for open-drain as well.
I am using the SLG46533V device which has pullup or pulldown resources if I need them. Quite an interesting little chip for sure. I highly recommend it if you need a small PLD with I2C interface :)
2023-05-12 03:23 PM
Yes, I am aware of writing the pins this way. Thank you for this though.