Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: joepasquariello

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. You can also measure within your code using...

    You can also measure within your code using millis(), micros(), or ARM_DWT_CYCCNT for clock cycle resolution.

    uint32_t start, stop, delta, min=0xFFFFFFFF, max=0;
    loop() {
    start = micros();
    ...
  2. Just issued a Pull Request on Paul's GitHub...

    Just issued a Pull Request on Paul's GitHub repository for FreqMeasureMulti.

    Please disregard my comment in previous message about initialization of INIT and VALx registers in function begin()....
  3. Will do. I'll wait a day and see if I get any...

    Will do. I'll wait a day and see if I get any other feedback here.

    The initialization of VAL0-VAL5 in begin() seems to be unnecessary, as those registers are associated with PWM and not with the...
  4. I'm rather new to this. Do I simply put this same...

    I'm rather new to this. Do I simply put this same info in the pull request?
  5. I tested the 3-PWM example sketch. Here is the...

    I tested the 3-PWM example sketch. Here is the output before the fix:

    60.02, 100.03, 199.90
    59.97, 100.04, 200.07
    60.03, 99.95, 200.07
    59.97, 100.04, 199.97
    60.02, 99.95, 199.90...
  6. FreqMeasureMulti for T4.x -- Bug Report/Fix

    I'm pretty sure I have found and fixed a bug in FreqMeasureMultiIMXRT.cpp. Please take a look.

    In FreqMeasureMulti::isr(), when the capture interrupt occurs (as opposed to the overflow...
  7. Yes, you can use the approach within Flasher3 for...

    Yes, you can use the approach within Flasher3 for your OTA solution. Think of Flasher3 not as a production solution, but as an example of how to write new firmware to Flash once you have (somehow)...
  8. Replies
    16
    Views
    2,506

    luni, thanks very much for the update. I'm...

    luni, thanks very much for the update. I'm running it now and it's working fine. The data below shows the rollover. Note the delta stays the same during rollover.

    Just one note, where you have...
  9. What Frank said. If you need to do updates via...

    What Frank said. If you need to do updates via Ethernet, work on getting Ethernet communication working, and you'll be able to combine with Flasher to do firmware updates that way.
  10. Replies
    16
    Views
    2,506

    @luni, great library. Thanks very much for making...

    @luni, great library. Thanks very much for making this available. I am using EncSim to simulate output of an optical encoder on a generator, and I need the signal to continue forever, as opposed to...
  11. Replies
    177
    Views
    21,328

    Oops. You're right.

    Oops. You're right.
  12. Replies
    177
    Views
    21,328

    The differences between A0 (A) and A1 (B) silicon...

    The differences between A0 (A) and A1 (B) silicon are described in this document

    https://www.nxp.com/docs/en/nxp/application-notes/AN12146.pdf
  13. Increase Code Size with const arrays

    I needed large hex files for testing on T3.x, and used this approach to increase code size. Thought I'd share in case anyone can use such a thing. Is there a shorter/easier method?

    //nested arrays...
  14. I've built a new version of Flasher to allow the...

    I've built a new version of Flasher to allow the largest possible upload by identifying empty sectors from the top of existing firmware to the bottom of flash reserve. This eliminates the need to...
  15. @gonzales, yes, you're right. I simply replaced...

    @gonzales, yes, you're right. I simply replaced FLASH_SIZE/2 with FLASH_BUF_ADDR everywhere. In that case, the original code should have been (FLASH_SIZE - FLASH_SIZE/2 - RESERVE_FLASH) and the new...
  16. @the_boss, yes, you could adapt this serial...

    @the_boss, yes, you could adapt this serial download/flash process to Ethernet. The same person (jonr) who wrote the original Flasher program for T3.x has also written Flasher4, for T4.x, which you...
  17. In the SMALL program source code, you should have...

    In the SMALL program source code, you should have FLASH_BUFFER_ADDR = (FLASH_SIZE / 4)
    In the LARGE program source code, you should have FLASH_BUFFER_ADDR = (3 * FLASH_SIZE / 4)

    Is that what you...
  18. Here is Flasher3d.zip. This version lets you set...

    Here is Flasher3d.zip. This version lets you set FLASH_BUFFER_ADDR (in file FlashT3x.h). I have only tested on T3.2 so far. The size of Flasher3d is about 42K, so I have set FLASH_BUFFER_ADDR =...
  19. Yes, it's possible. I did a test by replacing all...

    Yes, it's possible. I did a test by replacing all instances of (FLASH_SIZE / 2) with a new macro FLASH_BUFFER_ADDR. First, I defined FLASH_BUFFER_ADDR = (FLASH_SIZE / 2), so that's the same as...
  20. @gonzales, you are on the right track. Code size...

    @gonzales, you are on the right track. Code size limit is 1/2 of flash size, but the hex file is much larger due to all of the overhead of the hex file format. If you have the hex file on your SD...
  21. Replies
    205
    Views
    13,703

    Thanks for the info, @mlewus. I'm sure it's just...

    Thanks for the info, @mlewus. I'm sure it's just a matter of investing the time to get past the initial hurdles. One of these days I'll give it another go.
  22. Replies
    205
    Views
    13,703

    @mlewus and @mkingforger, can you comment on the...

    @mlewus and @mkingforger, can you comment on the process of updating your VSCode/PlatformIO environment when there is a new release of Arduino and/or TeensyDuino? I tried VSCode/PlatformIO twice,...
  23. Replies
    16
    Views
    822

    Thank you. I'm glad I asked.

    Thank you. I'm glad I asked.
  24. Replies
    16
    Views
    822

    I'm not experienced in electronic design, but...

    I'm not experienced in electronic design, but I've been curious about using Teensy 4.x in retrofit applications with 5V devices, including SPI. NXP's latest level shifters support 5V to either 3.3V...
  25. The hex lines below from a T3.6 hex file show the...

    The hex lines below from a T3.6 hex file show the 4-byte record at AD78 that breaks the 64-bit alignment. Further below are lines from the symbol file. AD78 is .fini (language cleanup code), which is...
  26. Thanks for letting us know, Frank. That's good...

    Thanks for letting us know, Frank. That's good news. I'd like to understand why the hex files always have the same pattern of record lengths ...16,16,16,8,4,16,16,16... There must be reason those...
  27. Flasher3c.zip is attached. This update accepts...

    Flasher3c.zip is attached. This update accepts the as-built Teensy hex files and so avoids the need to pre-process to get 64-bit aligned hex records for T35/T36. The differences from Flasher3b are...
  28. Thanks for letting us know, Frank. I will update...

    Thanks for letting us know, Frank. I will update IntelHex to handle larger files so that you don't have to hand edit.
  29. Agree, Jon. That's at the top of my list for the...

    Agree, Jon. That's at the top of my list for the next update to Flasher. Better to integrate what I did with IntelHex directly into Flasher.
  30. All Teensy hex files seem to have those lines....

    All Teensy hex files seem to have those lines. The IntelHex program does the same "fix" that you did manually. It is based on a C file (ihex.c) written by Paul, with just a couple of small changes...
  31. The address field in the intel hex format is 16...

    The address field in the intel hex format is 16 bits, so the max is 65535. For files larger than 64K, additional record types come into play that specify "base address", and the 16-bit address field...
  32. Yes, you're right, IntelHex is currently limited...

    Yes, you're right, IntelHex is currently limited to 64K. I'll have to modify it to handle larger files. Please provide the info about your target and your build environment. If you're using a build...
  33. I did a little more digging, and to clarify, for...

    I did a little more digging, and to clarify, for all T3.x, the 16 bytes from 0400 to 040F are set aside as "flashconfig" in the linker files (*.ld). File mk20dx128.c in cores\teensy3 defines those 16...
  34. I just repeated my tests with T3.2, T3.5, and...

    I just repeated my tests with T3.2, T3.5, and T3.6, and in all 3 cases, I get a match on the FSEC field between upper (new program) and lower (existing program). The program size limit is 1/2 of the...
  35. Okay. This is the set of conditional defines you...

    Okay. This is the set of conditional defines you need to add to your program, than add the Serial.println(FLASH_ID);

    #if defined(__MK20DX128__)
    #define FLASH_ID "fw_teensy3.0"...
  36. You just need the #define FLASH_ID...

    You just need the #define FLASH_ID "fw_teensy3.5", and then you need to make sure that string gets used within your program. What I suggest is adding a line in your setup function that says...
  37. For T35/T36, you must use the IntelHex.exe to...

    For T35/T36, you must use the IntelHex.exe to convert from 32-bit aligned records to 64-bit aligned. That will avoid the "align error".

    Any application you upload must contain the appropriate ID...
  38. This is a limitation of using a terminal emulator...

    This is a limitation of using a terminal emulator to send an ASCII hex file. There is no error checking except the record-level checks within the target. I can write a very simple command-line...
  39. Hi Jon. Yes, what the Flasher program is doing...

    Hi Jon. Yes, what the Flasher program is doing now (and has always done), is report the number of valid lines received. If it receives any invalid lines or, in the case of T35/T36, it receives a line...
  40. I use Teraterm, and it works, though I can't say...

    I use Teraterm, and it works, though I can't say I'm crazy about it.
  41. After you see those messages, you need to type in...

    After you see those messages, you need to type in ":flash XXXX", where XXXX is the number of lines reported by the program, and then hit Enter. When you hit Enter, as long as you have typed in the...
  42. Thanks very much. I like the option of a text...

    Thanks very much. I like the option of a text display.
  43. iniitu, that looks great. Would you mind...

    iniitu, that looks great. Would you mind providing a short summary of your connections and the working code?
  44. Flasher3b.zip is attached, with improvements from...

    Flasher3b.zip is attached, with improvements from Flasher3a and has been 100% reliable on many updates of T32/T35/T36. I was having trouble with T3.6, and after a lot of trial-and-error, added code...
  45. Thanks, Paul. Good to know. I'll experiment by...

    Thanks, Paul. Good to know. I'll experiment by decoupling the file transfer from the flash writes and see if I can figure out why doing Serial.print/flush after each record seems to fix it.
  46. Yes, or at least make it clear that firmware...

    Yes, or at least make it clear that firmware upload requires a "shutdown" of the application. Can you comment on whether disabling HSRUN might affect file transfer via the USB serial?
  47. The attached file Flasher3a.zip contains an...

    The attached file Flasher3a.zip contains an update to jonr's "flasher" for T32, with support for T35 and T36. The primary change relative to flasher is addition of a flash_phrase() function to write...
  48. Continuing to work on Flasher for T35/T36. As...

    Continuing to work on Flasher for T35/T36. As dahollen mentioned, flash operations are not reliable with high-speed mode enabled. The NXP reference manuals are clear that high-speed mode is not...
  49. Something a little different about T35 and T36....

    Something a little different about T35 and T36. The simple test of erase/write/read at the beginning of the program works fine, but the hex file transfer via TeraTerm seems to be failing. There are...
  50. Okay, thanks. The original flasher keeps...

    Okay, thanks. The original flasher keeps interrupts disabled from the the beginning of stage 2 (moving upper to lower) through the reboot. I'll keep it that way.
Results 1 to 50 of 99
Page 1 of 2 1 2