Hello Kasmir

I will take a look and hopefully others who are using PRU can also be helpful I 
began programming in asm many many years ago but haven't used PRU assembler. 
Can you reply whether you have an oscilloscope or high speed logic analyzer? 
This is what we used to debug many years ago. 
You could remove any memory Accesses by hard coding the data( modify your code) 
just do a tight loop toggling GPIO and measure the frequency.
This will tell you the max frequency of your GPIO 
Perhaps write some test code doing just that and share results . Staring at 
source code isn't always the fastest way to find error especially since we 
don't have your  exact set-up.
In the meantime hopefully someone sees something obvious. I'm sure the max 
frequency of what you are attempting has been discussed.
Maybe someone will comment on what they have achieved and share their solution.
Break the problem into peices and resist the temptations to be drawn into 
detour's can be challenging when getting input. 
By running experiments you can stay busy while waiting for input from group 
members 
I hope that's helpful
Mark





Sent from Yahoo Mail on Android 
 
  On Wed, May 12, 2021 at 2:57 PM, Kasimir<[email protected]> wrote:   
This is my code to output pattern on __R30; 
********************************************
    .global ausgabe
ausgabe:
    ldi     r18, 0              ; initial value
    ldi     r30, 0x10           ; debug
    ldi     r17, 0x00           ; debug
    mov     r13, r15            ; R15 contains start address, save in R13
    mov     r12, r14            ; R14 contains number of data points
naechster:
    lbbo    &r30, r15, 4, 1     ; (r15) = pattern
    lbbo    &r17, r15, 0, 2     ; (r17) = time to wait to output next pattern  
warte:
    sub     r17, r17, 1         ; delay loop 
    qbne    warte, r17, 0       ;
    add     r15, r15, 5         ; next element, update pointer
    sub     r14, r14, 1         ; number of remaining elements - 1
    qbne    naechster, r14, 0   ; was it the last one?
    mov     r15, r13            ; yes, load addess pointer with saved value
    mov     r14, r12            ; and load loop counter with saved number of 
elements
    lbbo    &r18, r16, 0, 1     ; load variable, if 0 run again, if != 0 exit
    or      r30, r30, (1<<4)    ; debug, trigger signal for oscilloscope
    qbeq    naechster, r18, 0   ; as long handshake[0] = 0 is
    jmp     r3.w2               ; r3 contains return 
address;*****************************************************************
The datastructure:typedef struct Event Event_t;                                 
                             
struct  Event                                                                   
           
{                                                                               
                               
    unsigned int  time;     // number of loops to the next event                
                                                       
    unsigned char pattern;  // Bit 7 | 6 | 5 | 4 |  3 | 2 |  1 | 0 |            
           
                            // ------+---+---+---+----+---+----+---+            
           
                            //       |   |   | d |~z34|z34|~z12|z12|            
                                            
                            // ------+---+---+---+----+---+----+---+
};

int main( int argc, char *argv[])
{
 int i;
 int j;
 Event_t event_knoten[500];
.......ausgabe(pattern_liste.anzahl, &event_knoten[0].time, &handshake[0]) ; // 
asm to write pattern                                                            
          // as long handshake[0} == 0
It works fine, only the  delay time loop need better resolution, at the moment 
the time for only one loop is too long.Have no idea to optimize ist. 
Also from or      r30, r30, (1<<4)    ; debug, trigger signal for 
oscilloscopetonaechster:
    lbbo    &r30, r15, 4, 1     ; (r15) = patternI measure 250nsec ..... was 
expecting 25nsec ..... 

I can see some jitter on my oscilloscope ( Tektronix THS730A ), has nothing to 
do withGND connection, long wires etc., all that is perfect. Oscilloscope works 
fine.
 Is it possible that "some what" from Linux / ARM area is disturbing my timing?
Thanks again for any helpfull input.Kasimir


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2a9748b2-ed2a-4278-9e30-fa153bf5c0fbn%40googlegroups.com.
  

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2093047926.7012.1620861953006%40mail.yahoo.com.

Reply via email to