Here a simple example showing how to receive SerEMU data from a FligthSim device (uses Mike O'Brien's HidLibrary https://www.nuget.org/packages/hidlibrary/3.3.40)
using HidLibrary;
using System;
using...
Setting the OCR1 register of the GPT timer will reset its counter.
If you set the counter in the OCR-ISR the actual period will be prolonged by the time it takes from the OCR1 event to the code which resets the...
Just did the same :-) Can't observe any drift.
Edit: looks like you started fiddling around with the register to set a new period while the timer runs? Since the requests for this feature somehow piled up recently...
It is just copying the current bits fromGPIO7_PSR (input register) to the variable in and shifting everything 4 bits to the right to account for the fact that the MM pins sit on bit 4-11 of GPIO7.
When you assign...
Does also look good and super easy to use but it seems to be targeted at larger machines? The one I linked is explicitly done for Cortex M processors. Don't know if it makes a difference though. Need to wait for my...
Actually it is quite, say, teensy :-)
Thought of encoding to jpeg before sending to reduce the data to transfer. Maybe something like this: https://github.com/noritsuna/JPEGEncoder4Cortex-M. Of course, this...
I tested the Teensy MM beta board in my DIY stepper motor carrier. This carrier is part of a solder paste dispenser project I'm working on since a couple of weeks. The T4 MM board finally motivated me to work on the...
You would need a debug probe like a JLink and the corresponding GDB server to make this work. Plus you need to modify the hardware of your Teensy to be able to connect this probe. You find some information and a link...
Actually, I'm currently working on it.
I don't know your mechanical setup but one often underestimates moment of inertia of the lead screw and motor anchor as limiting factors to the acceleration/deceleration....
Per default, both ISRs have the same priority. Thus the pin ISR won't interrupt the timer ISR.
Try
myTimer.begin(StatusUpdateTimer, 250000); // run every 0.25 seconds
myTimer.priority(64); // set priority to...
Defining things like 'D0' or 'TX2' without a dedicated namespace is screaming for trouble... However, I don't know if it make sense to do this in 'c++' in the core files since, AFAIK, they are supposed to work with old...
Just another guess, did you try INPUT instead of INPUT_PULLDOWN? If I understand correctly the camera works with 1.8V? Maybe this together with the internal pulldowns is just borderline?
I got my mm4 board and did some tests with the mmBus functionality. Looks like there is a glitch with the overwritten pinMode(mmBus, INPUT_PULLDOWN). I currently don't know why, but it somehow activates some latching...
This worked for me (measurement from the connector index hole which is better defined than the card edge...)
If gerbers help: https://github.com/luni64/mmStep/tree/main/Production
Actually, soldering the connector is super easy. It has two pins which conveniently fix it on the board. Just take an iron with a large flat tip and drag it across the pins using lots of solder. Then use some solder...
Somehow makes sense. I assume they don't want to restrict the usability of those general purpose carriers to special MM processors. Lots of opportunities to do special carriers :-)
Works with the usual Windows warnings on downloaded files. Still waiting for my MM board. But at least I can confirm that it is able to upload to a T4.1 :-)
Thanks, great work! Makes life so much easier :-)
Maybe unrelated but might be worth looking into: I once had a similar problem with an attached pwm controller breakout board. Turned out that it was drawing too much from the 3V3 regulator of the T4.0. Worked nicely...
I probably misinterpret your post. But just in case: the MM parallel port (G0-G7) is mapped to consecutive pins on GPIO7, starting at bit4. So, reading / writing a byte to it should be simple. Here how I did it (no...
Of course I don't know how professional you need/want to build that. At about 1:10 they give you a glance at the mechanical/electronical setup. Doesn't look like a bunch of RC-Servos controlled by a few Teensies :-)....
This just translates the Teensy Pin names to official pin names from the MicroMode spec. You can of course use Teensy Names as well but then you have to look up in a table where they end up on the carrier board (like...
Sorry, my post #64 was unclear. Currently this is not an Arduino library. The idea is to just copy the two files MicroModT4.h and MicroModT4.cpp into your sketch folder.
I also fixed the 'MM32' bug you've observed and...
I updated my little MicroMod helper files which I made for my DIY MicroMod T3.2. Should work now with the MicroMod T4. It contains the mapping of the MM pins to the Teensy pins so that you can use the pin names as...
Wild guess: Can it be that you have your common encoder pin connected to VCC instead of GND?
If you have a scope or an LA you can have a look at the pins if they are actually changing while you slowly rotate the...
In case an upgrade to a newer toolchain is still considered here an observation which might help debugging:
This
#include "Arduino.h"
#include <string>
void setup()
{
Looks like you didn't copy the libraries to the correct path? Unless the GCC folder structure is different for a MAC, they need to go into the MAC equivalent of this WIN10 folder:
...
https://github.com/TeensyUser/doc/wiki/GCC
Scroll down to "Switching between different toolchains". I'm usually using VisualTeensy where switching is done by simply changing the setting for the GCC folder. If you...
AFAIK you need to use at least GCC 6 for this. I just tested your code with gcc-arm-none-eabi-9-2019-q4. And it compiles without issue. There are a few discussions about this issue on Stackoverflow.
You are right, there is a bug in this example. Here a fix:
#include "Arduino.h"
#include "TeensyTimerTool.h"
using namespace TeensyTimerTool;
OneShotTimer timer{TCK, TCK, TCK, TCK}; // 4 one-shot-timers...
I second MarkT's remarks above and the currently implemented accelerators do not provide this.
However, if for some reasons you want to change the acceleration behavior, the library is prepared to use custom...
Your code doesn't write the changed time back to the RTC.
This one should work:
#include <Arduino.h>
#include <TimeLib.h>
void setup()
{
while (!Serial) {}
This https://forum.pjrc.com/threads/65023-Unique-Teensy-Serial-Number-using-getTeensySerial()-from-TeensyID-h?p=262494&viewfull=1#post262494 shows how to read out the EEProm before USB enumerates. In this case it was...
BTW: In case you don't know (or don't want to know) the size of your parts array beforehand you might consider changing it to vector<GUIIconPart>. If so, you probably don't need the uint8_t len anymore and you can make...
There are two issues in your code.
You can not initialize non literal static types directly in the a class declaration. You need to do that in some cpp file
Your array GUIIconPart parts needs a defined length...
That won't work since it will mess up the interrupt handling. Anyway, I'd simply define a relay function which, depending on the current mode, increments one of two variables. Limiting the values to two ranges is...
Thanks a lot, updated the repository accordingly.
BTW:
Doesn't work without DSB (or other syncing code) for short ISRs because the ISR will be reentered (interrupt flag not yet set after the ISR is left)
...
That's great. I was afraid that the std::function interface is quite expensive which it obviously isn't :-)
This is weird. The TMR has a combined IRQ for all 4 channels, therefore it needs to cycle through all 4...
You need to take into account that you can utilize the time needed for syncing the interrupt flag. Here an example using the code from LAtimes and replacing the callback by this:
void callback()
{
for...
Sorry for the delay, I finally found some time trying your code. I can not reproduce the problem. It generates nice 10ms calls here. Do you still have this problem?
Instead of calling your sequencer from loop I'd use an interval timer to generate the calls. You can then simply change the timer period when the encoder value changes. IIRC you are using the EncoderTool for your...
As Kurt mentioned, you can use the TeensyTimerTool if you need to access more timers with a high level interface. For the T4 you can use it with
2x GPT 32bit
16x TMR 16bit
4x PIT 32bit
20x TCK 32bit (Software)...
Nice measurement. Fits well with my experiences. A few remarks:
I might be wrong, but, I think that the "150MHz" timer clock speed is not fixed but actually F_CPU / 4.
You do not need to sprinkle asm("dsb") in...
Sparkfun now has a MicroMod version of the Pico: https://www.sparkfun.com/products/17720. Looks like the MicroMod form factor is getting traction. Looking forward to the first MM T4 :-) (I already prepared the first...
Per default the TimerTool runs the GPT and PIT timers at 24MHz. You can easily switch them to 150MHz in the config file. Configuration is described here https://github.com/luni64/TeensyTimerTool/wiki/Configuration.
...
Weird. The library code seems to be quite elaborated. Would be surprised if it has such bugs in it. Maybe you changed something unintentionally while porting stuff?
Yes, but does it print anything later while you are playing with the commands and getting the error? If so, the library might mess up some intervaltimer settings.
The "dsb" is only effective for very short ISRs. The one used by the lib is probably long enough. (But this should be fixed anyway I'd say)
Did you try to look if the library calls the functions from timer.h after...