Hello Habib,
Below is my new update for testing, hope you can verify and provide the solution.
1>Hardware
FRDM-MCXA153 using LPSPI0 in master mode
FRDM-MCXC242 using SPI1 in salve mode
2>Software
2.1>demo projects
FRDM-MCXA153: SDK_2.16.000_FRDM-MCXA153/lpspi_interrupt_b2b_master
FRDM-MCXC242: SDK_2.16.000_FRDM-MCXC242/spi_interrupt_b2b_slave
2.2>source code
FRDM-MCXA153: replaced by lpspi_interrupt_b2b_master.c in attachment
FRDM-MCXC242: replaced by spi_interrupt_b2b_slave.c in attachment
Notes: Other code in projects aren't be changed !
2.3>Test steps
Firstly, linking SPI from A153 to C242;
Then, compiling two projects and downloading to boards;
Then, opening two UART debug terminals for A153 and C242;
Then, in uart debug terminal for A153, you can send one char (as 'a' ...) to start test.
Then, the two uart debug terminals will print debug messages.
3> My findings:
3.1> C242 will correctly receive the datas sending from A153;
3.2> A153 will incorrectly receive the datas sending from C242;
Notes: I tested the MISO signal by oscilloscope, finding that the wareform is matched to the datas received by A153.
3.3> When the buffer size is changed to 1 or less than 4, the code for A153 can't work.
4> My questions:
4.1> Why C242 can't correctly send the datas to A153 (master) ?
4.2> Why Buffer size can't be changed to small in A153 ?
4.3> How to fix the problems ?
5> Debug Log
5.1> A153 (master)
see the attachment <master log.txt>
5.2> C242 (slave)
see the attachment<slave log.txt>
Thanks very much.