Try this program, which includes the test function from the other thread and calls it every 3 seconds.
What results do you see on serial monitor and oscilloscope?
Note: you were using SPI mode 2. From the technical note, I think it might need to be mode 0.
I’m testing the code you give and the result is on the oscilloscope at Mode0 is nothing just DC line, on the other hand at the serial monitor
but when i swich to mode 1 or 2 or 3 the oscilloscope stay the same but the serial monitor
i attach to you what i see when i use my original code from the oscilloscope.
Which output do you mean? SPI output from device back to Mega? Or the output of the device that the register writes are meant to control?
yes the second part which is The output of the device that the register writes are meant to be control.