hi, @PetrS
firstly thanks for response. according to my settings boudrate is about 3kbps. this is not final boudrate to be used. when I get stable communication I will set boudrate to faster one. also core clock frequency is 100MHz, per_clock is 40MHz, and FM_PER_CLK is 100MHz
In every SPI frame I'm sending 8 bit. but messages occur from different number of byte.( 1,2,4,5, and 33 byte including OPCODE)
I have already tried similar algorithm to your advice, with using TFFF, EOQF, RFDF. TFFF is used for sending messages which size is larger than 4. for smaller than 4 byte I did not enable the TFFF_EN. EOQF is used for sending next message and RFDF for receiving. But opitimum design is implemented using TCF and RFDF. My problem is not complexity, the problem is receiving unexpected zeros even through RXFIFO flushed and RFDF just enabled.