2024-01-22 01:31 PM - edited 2024-01-22 01:39 PM
Hi! Do we have write acces on pin set to alternate function push-pull?
Problem: CLK line floats after hal_transmitreceive, pullup helps but distorts clk line.
And with pullup there seems to be a glitch at end that slave can detect as fake clock cycle and push MSB out of its scope and add to end radom bit.
Should i go with LL spi will this help?
Attachment: clk with pull-up, yellow - clk
Solved! Go to Solution.
2024-01-22 02:37 PM - edited 2024-01-22 02:38 PM
Yes exactly. Enable Master Keep IO state.
2024-01-22 01:55 PM
CLK line should stay driven as long as the peripheral is enabled. Which chip? Show code.
2024-01-22 02:07 PM - edited 2024-01-22 02:09 PM
STM32H723 (genuine)
CubeIDE 1.14.1
Will post code tomorrow (I'm on night shift at the moment).
Do You want me to find and post here some specific part of code?
2024-01-22 02:10 PM
Which STM32? Some models have a setting that releases SPI pins after a transaction. If this is your case, disable releasing the pins.
2024-01-22 02:21 PM - edited 2024-01-22 02:37 PM
Its STM32H723ZG
How to disable releasing the pins?
Master keep io state : enable ?
Or should I set AFCNTR in SPI_CFG2 (bit 31) "LL_SPI_EnableGPIOControl" in the LL library?
2024-01-22 02:37 PM - edited 2024-01-22 02:38 PM
Yes exactly. Enable Master Keep IO state.
2024-01-22 02:42 PM
> Master keep io state : enable ?
This should work for what you want. When the SPI is disabled, the pins will still be driven.
2024-01-22 03:25 PM
Thank You all for Your answers !
2024-01-23 02:12 PM - edited 2024-01-23 02:15 PM
This setting solved the problem.