08-30-2019, 11:19 AM
Hello,
I have written a small library to operate GPIO of ROCKPro64 in C.
I was able to generate a square wave with period of around 2.2 microseconds. This means around 0.45 MHz. All measurements done with ROCKPro itself - I have no oscilloscope at hand.
If you are implementing SPI by software controlling of GPIO pins, this may be the way to go. But, if I understand the drawing correctly, there is a hardware SPI available on pins 19, 21, 23, 24.
I have to admit, that my result is probably still away from hardware capabilities. I am doing everything in user space, preserving state of other pins and protecting against collisions by using a mutex at each change of pin state. This is necessary, because I would like to operate more pins simultaneously in future.
Best regards,
Gienek.
I have written a small library to operate GPIO of ROCKPro64 in C.
I was able to generate a square wave with period of around 2.2 microseconds. This means around 0.45 MHz. All measurements done with ROCKPro itself - I have no oscilloscope at hand.
If you are implementing SPI by software controlling of GPIO pins, this may be the way to go. But, if I understand the drawing correctly, there is a hardware SPI available on pins 19, 21, 23, 24.
I have to admit, that my result is probably still away from hardware capabilities. I am doing everything in user space, preserving state of other pins and protecting against collisions by using a mutex at each change of pin state. This is necessary, because I would like to operate more pins simultaneously in future.
Best regards,
Gienek.