defragster
Senior Member+
I tried to put readGPS(); into yield() and that was a BIG FAIL to run - probably called before setup() of GPS is complete?
Too many readGPS(); calls are present - but I uploaded it that way anyhow < updated output from that shown below >
... re-updated see post #528 ...
I set the IMU 'now' time in the _isr when the interrupt says the data is ready. I also bumped up my IMU i2c Clock speed taking the transfer portion of those calcs down a bit. Since we are using wire not i2c_t3 code I can't see what the net clock speed in use is but I asked for 4 MHz.
The trend of uninterrupted IMU reads continues and goes along with the failure? I put a Dtime() in the print routine - and during this period no prints are made and no GPS or other normal calculations are made.
This points to printRate :: so I set that up from 25 to 50. Something goes wrong when this runs too often? :: if((0==GPS_newData) && (sincePrint > printRate)){
>> There is something odd here as they come in a group with no other debug output that should occur in the normal course of events??
I am now seeing all 5 Hz GPS updates at 240 MHz AND 168 MHz. I am sync'ing the debugGPS() on the GPS seconds to count and separate them versus an internal clock.
I left all my debug edits inline - if compiled with undefined "#define coutD" - it compiles without error and while calls remain the code safely goes away.
Here is a second plus either side of those 5 updates at 240 MHz - some measured times under 700 uS are not shown::
<EDIT>: Updated posted code - getIMU noise prints are now just a '^' each - as are all other Dtime(x,10,"") events under 750 uS. Will update sample output in following post.
Too many readGPS(); calls are present - but I uploaded it that way anyhow < updated output from that shown below >
... re-updated see post #528 ...
I set the IMU 'now' time in the _isr when the interrupt says the data is ready. I also bumped up my IMU i2c Clock speed taking the transfer portion of those calcs down a bit. Since we are using wire not i2c_t3 code I can't see what the net clock speed in use is but I asked for 4 MHz.
The trend of uninterrupted IMU reads continues and goes along with the failure? I put a Dtime() in the print routine - and during this period no prints are made and no GPS or other normal calculations are made.
This points to printRate :: so I set that up from 25 to 50. Something goes wrong when this runs too often? :: if((0==GPS_newData) && (sincePrint > printRate)){
>> There is something odd here as they come in a group with no other debug output that should occur in the normal course of events??
I am now seeing all 5 Hz GPS updates at 240 MHz AND 168 MHz. I am sync'ing the debugGPS() on the GPS seconds to count and separate them versus an internal clock.
I left all my debug edits inline - if compiled with undefined "#define coutD" - it compiles without error and while calls remain the code safely goes away.
Here is a second plus either side of those 5 updates at 240 MHz - some measured times under 700 uS are not shown::
Code:
@7:47.58 >> 5== ms_800
getIMU uS=612
getIMU uS=609
getIMU uS=610
kfP__ uS=1955
kf_U_ uS=1762
dtos_OutKF uS=230
getIMU uS=616
getIMU uS=610
getIMU uS=608
getIMU uS=608
getIMU uS=608
getIMU uS=609
kfP__ uS=1954
kf_U_ uS=1763
dtos_OutKF uS=232
getIMU uS=616
getIMU uS=611
getIMU uS=609
getIMU uS=609
getIMU uS=608
getIMU uS=608
kfP__ uS=1958
kf_U_ uS=1763
dtos_OutKF uS=233
getIMU uS=617
getIMU uS=611
getIMU uS=607
getIMU uS=609
getIMU uS=609
----- @7:47.59 >> 1== ms_0
getIMU uS=613
kfP__ uS=1951
kf_U_ uS=1764
dtos_OutKF uS=212
getIMU uS=616
getIMU uS=610
getIMU uS=609
getIMU uS=609
getIMU uS=609
getIMU uS=608
kfP__ uS=1955
kf_U_ uS=1763
dtos_OutKF uS=213
getIMU uS=615
getIMU uS=611
getIMU uS=609
getIMU uS=608
getIMU uS=609
getIMU uS=608
kfP__ uS=1955
kf_U_ uS=1769
dtos_OutKF uS=206
getIMU uS=617
getIMU uS=609
getIMU uS=610
getIMU uS=608
getIMU uS=608
getIMU uS=608
kfP__ uS=1955
kf_U_ uS=1764
dtos_OutKF uS=211
getIMU uS=615
@7:47.59 >> 2== ms_199
getIMU uS=614
getIMU uS=610
getIMU uS=609
getIMU uS=607
getIMU uS=608
kfP__ uS=1955
kf_U_ uS=1762
dtos_OutKF uS=213
getIMU uS=616
getIMU uS=610
getIMU uS=609
getIMU uS=608
getIMU uS=608
getIMU uS=608
kfP__ uS=1950
kf_U_ uS=1764
dtos_OutKF uS=208
getIMU uS=617
getIMU uS=610
getIMU uS=609
getIMU uS=608
getIMU uS=609
getIMU uS=608
kfP__ uS=1953
kf_U_ uS=1765
dtos_OutKF uS=211
getIMU uS=616
getIMU uS=611
getIMU uS=610
@7:47.59 >> 3== ms_400
getIMU uS=611
getIMU uS=610
getIMU uS=609
kfP__ uS=1955
kf_U_ uS=1764
dtos_OutKF uS=225
getIMU uS=617
getIMU uS=611
getIMU uS=608
getIMU uS=608
getIMU uS=609
getIMU uS=608
kfP__ uS=1953
kf_U_ uS=1763
dtos_OutKF uS=231
getIMU uS=615
getIMU uS=610
getIMU uS=608
getIMU uS=607
getIMU uS=608
getIMU uS=607
kfP__ uS=1954
kf_U_ uS=1763
dtos_OutKF uS=227
getIMU uS=616
getIMU uS=610
getIMU uS=609
getIMU uS=609
getIMU uS=610
@7:47.59 >> 4== ms_600
getIMU uS=613
kfP__ uS=1950
kf_U_ uS=1764
dtos_OutKF uS=230
getIMU uS=616
getIMU uS=610
getIMU uS=609
getIMU uS=608
getIMU uS=607
getIMU uS=608
kfP__ uS=1956
kf_U_ uS=1759
dtos_OutKF uS=230
getIMU uS=617
getIMU uS=610
getIMU uS=608
getIMU uS=608
getIMU uS=608
getIMU uS=608
kfP__ uS=1956
kf_U_ uS=1759
dtos_OutKF uS=231
getIMU uS=616
getIMU uS=610
getIMU uS=609
getIMU uS=608
getIMU uS=609
getIMU uS=609
kfP__ uS=1956
kf_U_ uS=1763
dtos_OutKF uS=233
getIMU uS=616
@7:47.59 >> 5== ms_800
getIMU uS=614
getIMU uS=610
getIMU uS=608
getIMU uS=609
getIMU uS=608
kfP__ uS=1954
kf_U_ uS=1763
dtos_OutKF uS=231
getIMU uS=616
getIMU uS=611
getIMU uS=609
getIMU uS=609
getIMU uS=608
getIMU uS=608
kfP__ uS=1948
kf_U_ uS=1762
dtos_OutKF uS=229
getIMU uS=616
getIMU uS=611
getIMU uS=609
getIMU uS=608
getIMU uS=608
getIMU uS=608
kfP__ uS=1954
kf_U_ uS=1761
dtos_OutKF uS=233
getIMU uS=616
getIMU uS=609
getIMU uS=608
getIMU uS=622
----- @7:48.0 >> 1== ms_0
getIMU uS=611
getIMU uS=609
kfP__ uS=1949
kf_U_ uS=1762
dtos_OutKF uS=213
getIMU uS=615
getIMU uS=611
getIMU uS=607
getIMU uS=609
getIMU uS=609
getIMU uS=608
kfP__ uS=1952
kf_U_ uS=1761
dtos_OutKF uS=211
getIMU uS=617
getIMU uS=611
getIMU uS=611
getIMU uS=608
getIMU uS=609
getIMU uS=608
kfP__ uS=1955
kf_U_ uS=1762
dtos_OutKF uS=210
getIMU uS=615
getIMU uS=610
getIMU uS=610
getIMU uS=609
getIMU uS=609
getIMU uS=621
@7:48.0 >> 2== ms_200
<EDIT>: Updated posted code - getIMU noise prints are now just a '^' each - as are all other Dtime(x,10,"") events under 750 uS. Will update sample output in following post.
Last edited: