On Nucleo board H743ZI, HAL in use, byte wise TRX setup,after few bytes sent, no TX anymore.
Hello
I got weird problem. I tried to experiment with WolfSSL+WolfTPM+ST33TP available package and example. All setup I did is according to available git pages as well as youtube tutorial. The original example was tested by WolfSSL on F4xx MCU, I tried to carry over all configurations carefully to my H7 nucleo setup.
To the point - I see communication on SPI2 is initiated - first transaction is visible on the lines. There are 3 phases for transaction:
-4 bytes TX (80 D4 00 00) /RX
-polling for wait states - in my case just single byte is TX/RX but wait flag is not seen.
-confirmation byte.
Then, next transaction is initiated, its exactly the same like the first one. But just SINGLE BYTE is transmitted (0x80) and that's it, bus is silent. When debugging I see that for both transactions the same data is feeded to HAL_SPI_TransmitReceive().
I attach:
SPI2 setup:
Overall traffic until TRX is gone (red circles mark where same TRX of 4 bytes should be visible):

Zoom in to first 2 bytes (correct behavior):

Zoom in to second transaction (NOK, just first byte is sent):

I also include 2 screenshots with state of all SPI2 registers in the moment (breakpoint stop) before HAL_SPI_TransmitReceive() is loading SECOND byte to TXDR for first and second transaction to see the difference. It is just one flag: TXTF which is set on second transaction but not on the first one.
First time:
Second time:
I went through documentation of SPI burt have no clue. I test on both SPI3 and SPI6. The issue is happening purely at STM32H743 side, I see such behavior even if I disconnect ST33TP.
I include also c code of transmission from wolfTPM package. SPI relevant conditional code is included. It is original file, I only changed IO Pin, where I hooked up /CS signal.
I suppose that the example is working fine for F4 platform, I have no opportunity to check this though yet. I guess SPI peripherals are not the same between F4 and H7, for example FIFO depth setting is not available.
Does anyone has a hint?
Greetings!
