Hi! Thanks Jim and BigMac for your response.
BigMac, what you told me is right, I have experimented it. after that I always put the breakpoints after the call of the spi send or receive.
The problem that I was trying to describe, (maybe I didn’t explained it so clearly, English is my second language
) is that when i start the debugging sometimes i can see the spi working well, the SPI1D reg is full after sending a character in the breakpoint, and after that i restart the debugging and it doesn’t have the same behavior , and the program is exactly the same.
I dont know why....