Forum Rule: Always post complete source code & details to reproduce any issue!
Page 174 of 174 FirstFirst ... 74 124 164 172 173 174
Results 4,326 to 4,339 of 4339

Thread: Teensy 4.0 First Beta Test

  1. #4326
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,779
    Quote Originally Posted by mjs513 View Post
    Ok - tweaked timings now they for the most part match the manual at 400/1M/3.3Mhz:
    Code:
    @100khz ---- 125khz
    @400khz ---- 391khz
    @1.0mhz ---- 961khz
    @3.0mhz ---- 2.78mhz
    Again this is for the MPU9250 so may be a bit different on your setup.

    Attachment 17967

    Just in case you want to give it a try.
    Looks and works fine - THANKS @mjs513 !!!

    I see this with T4 at 600 MHZ … temp is 48C::

    loopTime=26604964 :: @100khz ---- 125khz >> Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET, 100000, 100000);
    loopTime= 8920821 :: default 400 >> Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
    loopTime= 3959817 :: @1.0mhz ---- 961khz >> Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET, 1000000, 1000000);
    loopTime= 1632100 :: @3.0mhz ---- 2.78mhz >> Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET, 3000000, 3000000);
    loopTime= 1632100 :: same as 3MHZ - compiles okay >> Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET, 4000000, 4000000);

    Code w/mod to run this on SSD1306 when ssd1306_128x64_i2c.ino works : <edit> Add - runs SLOWLY fine at 100 Khz
    Last edited by defragster; 10-21-2019 at 12:34 AM.

  2. #4327
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,119
    @defragster

    Thanks for testing - glad it worked Oh by the way the clocks are set up you only will get 100khz, 400khz, 1Mhz and 3Mhz settings. Anything above 3mhz defaults down to 3Mhz so didn't surprise me that 3 and 4mhz was the same.

  3. #4328
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,779
    Quote Originally Posted by mjs513 View Post
    @defragster

    Thanks for testing - glad it worked Oh by the way the clocks are set up you only will get 100khz, 400khz, 1Mhz and 3Mhz settings. Anything above 3mhz defaults down to 3Mhz so didn't surprise me that 3 and 4mhz was the same.
    Glad to test - more glad you did the "ARGH!" work making the RefMan make sense in code

    As expected. I copied the code without looking - but assumed just those named cases were covered - as before. I had 4 MHz in the code and uploaded then noticed that and 3 MHz max clock, so it was just as easy to note it worked as ignore it.

  4. #4329
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,597
    Quote Originally Posted by defragster View Post
    @Paul - @other :: Is there a reason nothing higher than 1 MHz is tried in this WIRE file?:: \hardware\teensy\avr\libraries\Wire\WireIMXRT.cpp
    Well, yes there's a reason. But that reason is simply that I didn't feel like doing more than the 3 standard speeds when so many other things were needing my attention during the beta test.

    I did spend quite a lot of time fiddling with the many parameters while watching the results on my oscilloscope.

    Quote Originally Posted by mjs513 View Post
    With the addition of 2.2k pullups got the following results:
    Wow, that's pretty amazing you got 2.3 MHz to work with 2.2K pullups. Normally much lower value resistors would be used for that speed.

  5. #4330
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,779
    Quote Originally Posted by PaulStoffregen View Post
    Well, yes there's a reason. But that reason is simply that I didn't feel like doing more than the 3 standard speeds when so many other things were needing my attention during the beta test.

    I did spend quite a lot of time fiddling with the many parameters while watching the results on my oscilloscope.



    Wow, that's pretty amazing you got 2.3 MHz to work with 2.2K pullups. Normally much lower value resistors would be used for that speed.
    Opps - should have asked if there was a 'non-obvious' reason

    Looking at SSD1306 running here almost 2hours - that seems okay with 2.78 Mhz:: DVM gives me the idea the resistors on the board are 4.68 K Ohm.

  6. #4331
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,080
    Hi defragster, just following up on older post about flexcan memory

    Is there any interest in using unused flexcan controllers for RAM storage? If so, on T3, 48 dwords are accessible for 16 MB space, plus maybe 3-4 registers as 32 bytes read/write
    Obviously on a 64MB 1062, effectively gives you 192 DWORDs usage.

    Don't know if this is useful for temporary fast ram accesses vs slower eeprom usages, obviously storage is not saves on resets....
    Also accessing would be another idea to persue, RAM.read(x) RAM.write(x)..?
    Probably have an increment system and the library would handle the proper locations of the registers

    We could also probably do something along the lines of:

    RAM.data[0] = 1234;
    Serial.println(RAM.data[0]);
    Last edited by tonton81; 10-21-2019 at 03:17 AM.

  7. #4332
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,779
    Paul:
    in :: \hardware\teensy\avr\libraries\Wire\WireIMXRT.h
    I see this which seems out of place for T4?
    Code:
    extern TwoWire Wire3;
    Also on the rear of the T4 code the only place I see "SDA2" is on pin #25. But that text looks oddly to be in the 'GRAY' font not black … like Pin #24 SCL2

    Also reminder - Updated T4 cards need to indicate that SPI1 uses Pins #0 and #1. Recent post lost Serial1 with Spi1.begin() and it wasn't clear why.

  8. #4333
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,119
    Quote Originally Posted by PaulStoffregen
    Well, yes there's a reason. But that reason is simply that I didn't feel like doing more than the 3 standard speeds when so many other things were needing my attention during the beta test.

    I did spend quite a lot of time fiddling with the many parameters while watching the results on my oscilloscope.
    After the last couple of days trying to understand the timings and playing with the parameters I can commiserate with you on what you had to go through.

    Wow, that's pretty amazing you got 2.3 MHz to work with 2.2K pullups. Normally much lower value resistors would be used for that speed.
    Well maybe not that amazing I did forget to mention that the mini-board that I am using has 4.7k pullups already on SDA/SCL. Since you mentioned this is there some sort of rule of thumb for the size of the resistors vs speed.

  9. #4334
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,779
    Quote Originally Posted by tonton81 View Post
    Hi defragster, just following up on older post about flexcan memory

    Is there any interest in using unused flexcan controllers for RAM storage? If so, on T3, 48 dwords are accessible for 16 MB space, plus maybe 3-4 registers as 32 bytes read/write
    Obviously on a 64MB 1062, effectively gives you 192 DWORDs usage.

    Don't know if this is useful for temporary fast ram accesses vs slower eeprom usages, obviously storage is not saves on resets....
    Also accessing would be another idea to persue, RAM.read(x) RAM.write(x)..?
    Probably have an increment system and the library would handle the proper locations of the registers

    We could also probably do something along the lines of:

    RAM.data[0] = 1234;
    Serial.println(RAM.data[0]);
    Thx - Was that like forever ago? Indeed I wondered about that misreading/looking at the RefMan memory map. MB == Mailbox not MegaByte So if any CAN was active that potion area would be reserved.

    Would have been cool if it was Battery backed.

    I never got an understanding of the 4 DWords the RefMan called battery backed I found where two seemed to be in use? Though 64 'static' bits could save the day.

  10. #4335
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,080
    Yes it would be for inactive CAN controllers.
    If a user uses CAN2, he can optionally use CAN1 or CAN3 for non-volatile ram storage which should be pretty fast, the controller will remain in freeze mode so the data wont be meddled with.

  11. #4336
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,269
    Quote Originally Posted by mjs513 View Post
    Well maybe not that amazing I did forget to mention that the mini-board that I am using has 4.7k pullups already on SDA/SCL. Since you mentioned this is there some sort of rule of thumb for the size of the resistors vs speed.
    Well there is this document from TI:

  12. #4337
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,119
    @defragster - @KurtE

    Found my SSD1306. Wouldn't work initially at 3Mhz so I added 4k7 pullups to match what you were seeing with your display, then it started working at 3Mhz. This is what I was reading on the scope:
    Code:
    @100khz  ---- 126khz
    @400khz  ---- 390khz
    @1Mhz     ----  909Mhz
    @3Mhz     ----  2.5Mhz (a bit slower than on the MPU-9250

  13. #4338
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,119
    Quote Originally Posted by MichaelMeissner View Post
    Well there is this document from TI:
    Thanks Michael - never came across that document before when I was searching a long time ago

  14. #4339
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,432
    Good morning, looks like great progress. Will try to find some of my I2C devices and play. But it might be a few days as I still am playing with some other things like servos...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •