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();
.... your stuff .......
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(). Those are necessary....
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 input capture. Those...
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
59.97, 100.04, ...
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 interrupts), the ISR is reading...
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) transferred the new...
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 "continous", it should...
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.
@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 stopping at a...
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 of integers to...
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 explicitly specify the...
@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 code (FLASH_SIZE -...
@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 can find here:
...
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 have?
Which...
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 = FLASH_SIZE/4 = 64K....
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 Flasher3c. Then I tried...
@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 card, you can use the...
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.
@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, with about a year in...
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 or 1.8V and operate...