As mentioned, you can't really tell what a compiler is going to turn
your C code into. As you discovered, the v2 code that is actually more
suited to the PRU low-level assembly instructions turns into worse
assembly because of the compiler. I suspect you have at least two
problems with your c
Hi Charles, thank you very much for your answer,
I followed your advice but something overly odd is happening.
First of all, let me contextualize you: the image sensor is always sending
data through the CS, SCLK, and MOSI pins. The delay between each frame is
about 10 ms. That said, I wrote the c
On 12/7/2018 3:52 AM, Fred Gomes wrote:
>
> Here's the code where I got the better results:
>
> while(__R31&cs); // CS = 1
>
> while(__R31&sclk){ //sclk = 1
>
> if(__R31&cs){
> goto END;}
> }
> while(!(__R31&sclk)); //SCLK = 0
> var = (__R31&miso)? var |(0x01 << shift): var;
>
> k++;
> shift-
Hi Gerhard,
Thank you very much for your answer.
In fact, I did not have the CS and Clock pins defined as "define", I made
the program a way faster.
Another tip that improved the program's performance a lot is to access the
storage array through a pointer, rather than a direct indexation, like th
Am 04.12.18 um 10:25 schrieb fred.p.gome...@gmail.com:
Hi, I need your help,
I need to read data of an SPI Master device on the BeagleBone. Since
the SPI kernel driver doesn't support an SPI slave mode I have to
implement it in the PRU (Because the maximum frequency one
BeagleBone's GPIO can
Try writing in assembly, or at least providing a listing of the PRU
code your compiler is generating. The C code you've written could
turn into very ugly assembly with a lot of memory reads (which are
*VERY* expensive on the PRU) depending on the compiler.
In general, for speed you only want the
I've forgotten to mention. I am sending the clocks from the PRU 1 to PRU 0
at this time. So I know exactly how many clocks there is and the frequency.
The objective is to plug the sensor which I want to read the data after
having this working .
-- Fred Gomes
escreveu no dia terça, 4/12/2018 à(s
Hi, I need your help,
I need to read data of an SPI Master device on the BeagleBone. Since the
SPI kernel driver doesn't support an SPI slave mode I have to implement it
in the PRU (Because the maximum frequency one BeagleBone's GPIO can be
toggle is only 15 KHz).
>From what I have read, the PR