-
Older Activity
-
Yesterday, 08:42 AM
have you installed the required resistors for I2C? it wont work without them
3 replies | 45 view(s)
-
Yesterday, 08:34 AM
most of the time it was bad grounding and cheap pololu cabling that caused no outputs due to corrupt crc data it may look like it’s doing nothing because of the wiring but it’s discarding the corrupt data while firing...
1832 replies | 89389 view(s)
-
Yesterday, 06:22 AM
the T3.2/3.5/3.6 for most part are similar same chips with added features on the higher revision models. Like more pins which contain additional peripherals, faster cpu, and ram, etc. But the core of it is very much the...
11 replies | 180 view(s)
-
Yesterday, 06:12 AM
not sure why it wouldnt work, check common ground with the new setup? I will have to find time maybe day or 2 to setup 2 teensies
1832 replies | 89389 view(s)
-
02-19-2019, 11:42 PM
you could have also statically just set them as 0xB0, if theyre all suppose to be same without differences
*(p->pad) = 0xB0;
1839 replies | 47805 view(s)
-
02-19-2019, 10:00 PM
most likely the loop area
13 replies | 188 view(s)
-
02-19-2019, 01:05 PM
how about a double tap to reprogram, single tap for reset, or hold for specific period (2 secs?) for program mode :)
8 replies | 88 view(s)
-
02-19-2019, 06:06 AM
https://www.pjrc.com/teensy/external_power.html
option #3 is of interest to you
6 replies | 103 view(s)
-
02-19-2019, 05:52 AM
long should be unsigned long for now and last, as theyre unsigned 32 bits variables, not signed.
the negative effect of the rollover on signed variable can cause problems “over time”, and most likely the impact here....
14 replies | 170 view(s)
-
02-19-2019, 05:44 AM
if your external source voltage backfires to your PC port, it may or may not work, however, if the voltage of the external psu is higher you can blow out the PC usb port. Secondly some arduinos switch to the external...
6 replies | 103 view(s)
-
02-18-2019, 11:02 PM
*(p->pad) &= ~IOMUXC_PAD_PKE;
1839 replies | 47805 view(s)
-
02-18-2019, 10:06 PM
I noticed on several sites, regarding setting up the clocks, I see many fsl_clock_config files like so:...
1839 replies | 47805 view(s)
-
02-16-2019, 01:45 PM
slave pins used should be 2, 11, 12, and 14 for T3.x models
the config file is for the master selected spi pins, the slave’s is fixed
1832 replies | 89389 view(s)
-
02-16-2019, 01:37 AM
if you want to transfer arrays you could also try out SPI_MSTransfer, where it has peripheral controls and callback payload transfers in both directions
This library was developed for high speed data transfers...
10 replies | 161 view(s)
-
02-16-2019, 01:36 AM
change spimode to “8” instead of 16 for 8 bit transfers, if your getting 65535 verify your miso is not swapped with mosi, you can always swap them to see if it works or use a scope. To so a simple test, send a spi byte...
10 replies | 161 view(s)
-
02-15-2019, 06:02 AM
why are you using ONLY CAN1 TX, and trying to access Can0 in code, definately wrong
try using pins 3 & 4, CAN requires both RX and TX to be used in order to be working, hooked up to a transceiver
17 replies | 245 view(s)
-
02-13-2019, 03:31 AM
and your testing the normal pins at end of t3.6 board or pins 3 and 4? the main ones are bottom corner, 3&4 are alternate pins you can swap to using the Can0.setRX(ALT) functions on IFCT, but shiuld make sure you try...
17 replies | 245 view(s)
-
02-13-2019, 02:09 AM
is there any activity on the transceiver and/or teensy pin? if so, try swapping the io pins RX/TX perhaps theyre reversed?
17 replies | 245 view(s)
-
02-12-2019, 06:00 AM
some transceivers have an enable pin, if theyre not asserted, you simple wont see anything at all, transmit or receive.
you should have a common ground between the teensy and transceiver and connect TX to TX and RX to...
17 replies | 245 view(s)
-
02-12-2019, 05:33 AM
pretty much yeah :)
but start it easy first, let it show what it sees on the serial monitor when the transmissions occur, the rest will come to you easily
6 replies | 81 view(s)
-
02-12-2019, 05:20 AM
irregardless, you will have no issue identifying that frame when you see it, 568 will be populating the msg.id variable and your payload will appear in msg.buf;
sorry I didn’t catch your last post I would have...
6 replies | 81 view(s)
-
02-12-2019, 04:30 AM
It’s definately possible to do, a received frame ID would update the msg.id with the CAN ID of the frame.
But what do you mean frame id is “t568101”?, that is not valid, are you looking at the data field?
6 replies | 81 view(s)
-
02-12-2019, 04:09 AM
all CAN data is the same, I would check if the transceiver pin is enabled and verify the connections if you still see no data
17 replies | 245 view(s)
-
02-10-2019, 05:30 PM
Not too bad, here we get snowstorms and snow pileups that bury cars, and ice rain inbetween snowfalls haha :)
1839 replies | 47805 view(s)
-
02-08-2019, 05:05 AM
the only issue i would correct of that library but didnt have time yet to do is instead of declaring a void isr function of the core was to overwrite the existing vector with a new isr function, this is because if i...
10 replies | 161 view(s)
-
02-08-2019, 04:51 AM
have you tried IFCT library with a simple IFCT example loaded? If that works then you confirmed its a configuration/library issue with your code
17 replies | 245 view(s)
-
02-08-2019, 04:41 AM
or take a peek at TSPISlave library that supports SPI slave mode among LC and T3.x for all available SPI ports (SPI,SPI1,SPI2)
also if you are getting 65535, make sure your MOSI and MISO lines are not reversed and...
10 replies | 161 view(s)
-
02-06-2019, 07:18 PM
you can check out duff’s snooze library, for very low power states
yes, its possible to determine if a pin is used as input or output
6 replies | 99 view(s)
-
02-06-2019, 05:25 PM
try INPUT_DISABLE
6 replies | 99 view(s)
-
02-06-2019, 04:43 AM
is the motor controller broadcasting at any time or just set to receive only? available wouldnt see anything if nothing was being sent around on the bus.
17 replies | 245 view(s)
-
02-03-2019, 10:26 PM
everything after the colon is a default initializer, in this case it’s instantiating a bounce object for that pin that will be used by the MIDIbutton class, of 10ms
1 replies | 64 view(s)
-
02-02-2019, 08:29 PM
https://electronics.stackexchange.com/questions/65538/i2c-pull-up-resistors-calculation-where-to-place-them
18 replies | 208 view(s)
-
02-02-2019, 08:17 PM
as close to the master as possible is recommended, however some people place them at the slave device. results vary but its recommended only one set near the master, and to make sure no other slaves have pullups as well.
18 replies | 208 view(s)
-
02-02-2019, 12:38 AM
looking at your pic i can also see you don't have the correct I2C pins wired. Since when is pins 17 and 18 for I2C? Should be 18 and 19..
Honestly I think you took out the 2nd LC and put it back at an offset of 1 pin...
18 replies | 208 view(s)
-
02-02-2019, 12:31 AM
be careful, the UNO has internal 5V pullups when I2C is enabled!
18 replies | 208 view(s)
-
02-01-2019, 09:38 PM
Here is the code to reset the LC via software, just use any GPIO as an input source:
SCB_AIRCR = 0x05FA0004;
something like:
(setup)
pinMode(5,INPUT_PULLUP);
while ( !digitalReadFast(5) );
8 replies | 139 view(s)
-
02-01-2019, 09:32 PM
Unfortunately there is no physical reset button on LC. You can either do it via software (you can trigger a reset via a button push using a GPIO, thereby calling a system reset OR a watchdog reset), or via hardware with...
8 replies | 139 view(s)
-
02-01-2019, 09:16 PM
You could enable the LC watchdog timer, and use it to restart the CPU via a timeout or software trigger
8 replies | 139 view(s)
-
02-01-2019, 09:15 PM
I've always seen this lag issue when Opening a recent file in like, forever, it's an IDE issue im sure.
1839 replies | 47805 view(s)
-
01-30-2019, 02:41 AM
hardware spi slave support for any of the 3 hardware SPI ports on 3.6 is supported and on the forums
6 replies | 144 view(s)
-
01-27-2019, 06:14 PM
you could try changing the interrupt priorities?
4 replies | 106 view(s)
-
01-27-2019, 03:54 PM
the need for 2 minimum CAN controllers are used by enthusiasts for isolated CAN gateways or bridging as well. On the other side, you can use it for communication between microcontrollers in over 40 meters as its a...
1839 replies | 47805 view(s)
-
01-25-2019, 01:03 AM
have you tried with and without the SION bit for reading the pin? perhaps the SION uses more cycles as oposed to reading an input pin without it?
1839 replies | 47805 view(s)
-
01-20-2019, 08:25 PM
i’ve tested loopback mode and havnt been able to receive even with self reception enabled and listen only modes...
if self reception is not working and the transmit buffers are all filled pending arbitration, its...
1839 replies | 47805 view(s)
-
01-20-2019, 08:12 PM
yes they both should be 0x10 i’m sure the above was a typo (at least on my end both are ALT0 - 000
1839 replies | 47805 view(s)
-
01-20-2019, 05:48 PM
PFD1->3 look slightly off
1839 replies | 47805 view(s)
-
01-18-2019, 08:12 PM
teensy and many arm mcus also have more c++ libraries and functionality supported in the core, which avr lacks mostly, but for dynamic you can get rid of the F() arduino style and just use const on teensy
6 replies | 347 view(s)
-
01-16-2019, 03:05 PM
Since we are talking about the daisy register one of the perfect uses is when sharing the SPI interface. Let’s say the MISO pin of one device cannot tristate (damn them!), you can share the SCK and MOSI pins, have...
1839 replies | 47805 view(s)
-
01-16-2019, 02:52 PM
not familiar with the j1939 protocol itself, but theres 2 libraries available for teensy 3.6 FlexCAN_Library and IFCT. You might want to search github for “J1939 arduino” or “J1939 teensy” to show what shows up. If you...
1 replies | 109 view(s)
-
01-16-2019, 02:41 PM
yeah the daisy register is a mux that the peripheral talks through, and that mux has the path to one of the X pins of the actual pin the hardware is attached to. when changing pins for peripherals its a good idea to...
1839 replies | 47805 view(s)
-
01-15-2019, 04:28 AM
Also if not already done canbus requires a 120 ohm termination, the resistor is already in place on the breakout board i use, possibly check yours?
12 replies | 345 view(s)
-
01-14-2019, 11:33 PM
please dont use the constructor in the first code, Can0 is always available when IFCT.h is included.
your second example looks alright, verify that you are using pins 3 & 4 on t3.2/3.5/3.6, if your using the alternate...
12 replies | 345 view(s)
-
01-14-2019, 09:42 PM
can you show your code? if they are getting acknowledged theres an issue with either your callback or your interrupts
i just set it up now on a t3.5 and t3.2 and i can see send and receives on both ends :)
make sure...
12 replies | 345 view(s)
-
01-13-2019, 07:43 PM
Hi all, the flexcan MCR issue is ressolved, so can be crossed off the list, guess T4 will have a new library in future. Although most of the code is same as IFCT there are still subtle differences. We also currently...
1839 replies | 47805 view(s)
-
01-13-2019, 05:37 PM
Note that if you don't run Serial.begin(x) and attempt to write to Serial a couple times this would cause faults on T4, doesnt happen on T3.
void loop() {
delay(500);
Serial.println("HELLO WORLD");
}
...
1839 replies | 47805 view(s)
-
01-13-2019, 08:37 AM
Alot of times this is due to faulty usb cables or power only usb cables, even if they worked before, or even if you changed the cable, change it again. The trace is on all teensy 3.x boards, you should only provide...
29 replies | 789 view(s)
-
01-13-2019, 04:43 AM
Here it is, I also wrote a basic example of the usage, it depends on the definitions in the cores pull request i submitted yesturday for imxrt.h
https://github.com/tonton81/Watchdog_t4
1839 replies | 47805 view(s)
-
01-13-2019, 03:54 AM
I'm almost done with a library for watchdog. It will enable a watchdog output on pins 19 or 20 that after a watchdog reboot will keep the pin states LOW until an actual user reset is applied. I also added callback...
1839 replies | 47805 view(s)
-
01-12-2019, 03:42 AM
Just tested another thing, you can actually feed the watchdog from within the ISR to prevent the maximum threshold from being reset as well
1839 replies | 47805 view(s)
-
01-12-2019, 02:22 AM
For watchdog, should we make a library or make it part of the core? I updated the definitions in imxrt.h and submitted a pull request, and have working code, and enabled the vector table for the callback
Note:
I...
1839 replies | 47805 view(s)
-
01-10-2019, 01:41 AM
did you check the bios to see if USB Initialization is set to Full instead of Partial? my PC wont boot with T4 attached until i disconnect it and reboot, dunnonif its related but first time i seen that hehe the asus ROG...
1839 replies | 47805 view(s)
-
01-06-2019, 08:08 PM
this is ran from setup before a while(1); blocks the loop
float float_rand( float min, float max ) {
float scale = rand() / (float) RAND_MAX; /* */
return min + scale * ( max - min ); /* */
}...
1839 replies | 47805 view(s)
-
01-06-2019, 07:50 PM
yeah i just wanted to test a conversion from cycles to nanos, cycles show “2” when multiplying 1000 floats
1839 replies | 47805 view(s)
-
01-06-2019, 07:04 PM
does anyone have the nanos() code i can play with? i think the chip is too fast to do speed tests on variables, as micros/millis never change when im testing floats
Also there doesnt seem to be a code limit size break...
1839 replies | 47805 view(s)
-
01-04-2019, 04:45 PM
Noting this here as possibly it's a BIOS issue or USB issue
I have an ASUS ROG RAMPAGE IV EXTREME mainboard, when I rebooted the PC it stopped booting (going past the BOOT slpash screen). After about 10-15 seconds you...
1839 replies | 47805 view(s)
-
01-04-2019, 03:55 PM
yup actually all bits there are not modifyable/changing, freeze mode or not, maybe its an initialization issue of some sort, still new to the new stuff :)
1839 replies | 47805 view(s)
-
01-04-2019, 03:19 PM
yes always in freeze mode ive tried, more or less everything is same as previous ifct/flexcan_library in terms of registers except now its possible to have 64 mailboxes instead of 16, and for the t3.x series it wasnt in...
1839 replies | 47805 view(s)
-
01-04-2019, 03:00 PM
does anyone have issues setting certain registers? im still on beta5 not home yet to try beta6 yet, the POR for the CAN MCR register defaults to 16MBs, on the 3.x series it was only possible to change it by clearing...
1839 replies | 47805 view(s)
-
01-03-2019, 01:39 AM
if (bits < 1) {
bits = 1;
} else if (bits > 16) {
bits = 16;
}
I usually use constrain when I write similar code :)
constrain(bits, 1, 16);
1839 replies | 47805 view(s)
-
01-02-2019, 04:24 PM
While working over the CAN registers, both CAN controllers consume 166 defines, I was able to cross verify and match the addresses between T4 & T3.x with new defines, the addresses are basically same except for the...
1839 replies | 47805 view(s)
-
01-02-2019, 02:43 PM
#define CCM_CCGR0_CAN2_SERIAL(n) ((uint32_t)(((n) & 0x03) << 20))
#define CCM_CCGR0_CAN2(n) ((uint32_t)(((n) & 0x03) << 18))
#define CCM_CCGR0_CAN1_SERIAl(n) ((uint32_t)(((n) & 0x03) << 16))
typo, small...
1839 replies | 47805 view(s)
-
01-02-2019, 12:44 PM
heres for t3.6, https://forum.pjrc.com/attachment.php?attachmentid=10666&d=1495536536
theoretically it should be same accross all 3.x units, as the higher end ones have extended registers
but better to test it to...
2 replies | 100 view(s)
-
01-01-2019, 10:19 PM
does that mean you could control leds/servos raw without using timers if the nanosecs are pretty accurate on T4? :)
1839 replies | 47805 view(s)
-
01-01-2019, 07:48 PM
You can use this for fast toggling of LED:
GPIO2_DR_TOGGLE |= (1UL << 3);
1839 replies | 47805 view(s)
-
12-31-2018, 04:43 AM
for long SPI cabling forget about 24MHz but to help prevent ringing you’d need to put small resisters in series near the source driven lines. You could go further distances as well by decreasing the SPI speed. I’ve...
3 replies | 149 view(s)
-
12-30-2018, 11:51 PM
Took a quick look at the rt1050 manual and a glimpse of the SPI code, not a priority but for notes
IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_03 = 3 | 0x10; // SCK
//digitalWriteFast(10, HIGH);
//pinMode(10, OUTPUT);...
1839 replies | 47805 view(s)
-
12-30-2018, 10:02 PM
Serial4.print("D13: ");
Serial4.println(digitalReadFast(13));
all the reads after toggling have been showing always 0 on the outputs for all 3 betas
value = 989680
12345678
D13: 0
577953
1839 replies | 47805 view(s)
-
12-30-2018, 09:55 PM
Kurt, I don't think digitalRead is working, just pointing it out since you're using it in your code, im using a toggled bool as an alternative for blinking
static bool flip;
digitalWrite(13, flip = !flip);
1839 replies | 47805 view(s)
-
12-30-2018, 09:38 PM
Paul, I ran your SPI test above and added a while(1); at end of setup
void setup() {
digitalWrite(9, HIGH);
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
SPI.begin();
...
1839 replies | 47805 view(s)
-
12-30-2018, 02:03 PM
you tried a brief program pulse first before reflash or was it really bricked to have to do 13 sec hold?
1839 replies | 47805 view(s)
-
12-30-2018, 01:18 PM
Confirmed, -fno-threadsafe-statics is not needed since Paul has fixed the acquire/release guards for local statics
These still work as well:
AVR non-standard functions: ultoa, ltoa, dtostrf
float f_val =...
1839 replies | 47805 view(s)
-
12-29-2018, 03:26 AM
Mike, I don't know which version you have or if you messed up the build file but im using bolderflight Eigen library on github, it wouldn't compile though because of the operator new error:
undefined reference to...
1839 replies | 47805 view(s)
-
12-29-2018, 02:57 AM
I tested the listed non standard AVR functions on the list, they match the outputs as expected
float f_val = 123.67942;
char outstr;
dtostrf(f_val, 7, 5, outstr);
Serial4.println(outstr);
...
1839 replies | 47805 view(s)
-
12-29-2018, 02:41 AM
#include "circular_buffer.h"
Circular_Buffer<uint32_t, 8> cb;
Circular_Buffer<uint32_t, 8, 100> cba;
#include "coremark.h"
void setup() {
uint32_t arr = { 1, 2, 3, 4, 5 };
cba.push_back(arr, 5);
...
1839 replies | 47805 view(s)
-
12-29-2018, 02:20 AM
coremark running
647120
2K performance run parameters for coremark.
647810 us 13072680
CoreMark Size : 666
Total ticks : 13069010
Total time (secs): 13.069010
Iterations/Sec : 2295.506699
Iterations...
1839 replies | 47805 view(s)
-
12-29-2018, 01:02 AM
ok i added a compiler flag in boards.txt
teensy4b.build.flags.cpp=-fno-exceptions -felide-constructors -std=gnu++14 -fno-threadsafe-statics -Wno-error=narrowing -fno-rtti
that seems to compile
now if you look...
1839 replies | 47805 view(s)