A
Reaction score
35

Latest activity Postings About

    • A
      AndyA replied to the thread FlexCAN_T4 Receive timing..
      If you need faster data over CAN your options are somewhat limited. Higher baud rates are an obvious quick win. For lots of data you can use CAN FD. If you only have a very small amount of data then depending on the environment you can sometimes...
    • A
      AndyA replied to the thread FlexCAN_T4 Receive timing..
      And if you look close enough you will see differences in time for two packets of the same length. CAN performs bit stuffing, if there are more than a certain number of 0's (5?) in a row then the hardware inserts an extra 1 into the packet. This...
    • A
      AndyA replied to the thread FlexCAN_T4 Receive timing..
      The standard CAN "interrupt" logic follows the Arduino model, it's called as user level code when you call the .events() method. This is good in that it means it's harder to create code that locks up and avoids the gotchas that come with true...
    • A
      I can't see any reason why that wouldn't work fine.
    • A
      Good point, I'd forgotten that the teensy doesn't have a diode combining the power input options. In the image here the lower left pin is the Teensy Vin. If you were to cut the trace between the two rectangular pads then that disconnects the...
      • 1737979573182.png
    • A
      AndyA replied to the thread Overclocking Teensy 4.1?.
      This is for a car? Cars simply don't move that fast, 100Hz is fast enough if you are measuring body dynamics for a normal car. Maybe 500Hz if you want complete overkill. Anything over that and all you'll be logging is sensor noise.
    • A
      For the regulator look at the thermal resistance part of that datasheet, that will give you a rough idea of how much the regulator will heat up for a given power draw (In this case power = voltage drop * current = 1.7* current). This will depend...
    • A
      Up to. Assuming USB3. Don't assume every port can deliver that much power. Anyway your 3.3V isn't coming from the USB. It's coming from the 5V to 3.3V regulator on the teensy. The teensy has a linear regulator that in theory supports currents...
    • A
      AndyA replied to the thread Overclocking Teensy 4.1?.
      Rather than trying to do anything clever just define an array to act as your buffer. Use the DMAMEM keyword to put it in RAM2 so that you have plenty of space for it. As @joepasquariello indicated handle this as a ring buffer, track the head and...
    • A
      AndyA replied to the thread Overclocking Teensy 4.1?.
      A couple of thoughts based on a quick scan through the code: You look to be writing data to the SD card as fast as possible rather than only writing when one of your inputs has changed. It may be they are changing fast enough that this is always...
    • A
      You did something pointless. Why not read directly into the final buffer using file2.readBytes((char*)data, 4 * N) Also I'd recommend doing something like: #define ArrayType float const int arrayLen = 10000; EXTMEN ArrayType data[arrayLen]...
    • A
      I'm not sure how much internal buffering littleFS does but if possible writing in blocks that match the FLASH sector size will probably be the most efficient option. Since NAND flash is block based for reads as well as writes there may also be a...
    • A
      If you want to store data in binary format then write it to the file in binary format. file.write( dataPtr , length ) and the equivalent read function should work for reading binary data. This would allow you to read/write a single value or a...
    • A
      AndyA reacted to beermat's post in the thread Teensy remote display with Like Like.
      If you have a Teensy with Ethernet and a TFT screen that you update with buffers of 16 bit RGB565 pixel data you should be able to use this code, along with the supplied Mac or Windows client, to also display (and control) the screen remotely on...
    • A
      FlasherX assumes that your new code that you are uploading also includes FlasherX, after all why would you want to upgrade to a firmware that can't be upgraded again? If you have a basic flasherX bootloader (FlasherX.ino) that loads your main...
    • A
      AndyA replied to the thread Very weird network issue / bug.
      OK problem solved - posting here just in case someone else hits a similar issue in the future. The transmit code was along the lines of: bool sendMessage() { uint8_t dataBuffer[dataLength]; [populate data buffer]...
    • A
      No complete code / example because the system is way too big and complex :-( So not looking for a solution, more a pointer in the right direction if anyone has any ideas. I have a Teensy4.1 application that streams data over the network from a...
    • A
      The library always adds 64 bytes of buffer as standard for all physical serial ports. I've not dug into the USB port but I believe it has a larger buffer as standard. Max added memory is 65472 bytes (64k - 64 giving 64k of buffer total). Min is 0...
    • A
      AndyA replied to the thread Meet Teensy 4 Pro.
      Also you wouldn't need to move chips from a teensy onto your board. You can purchase the bootloader chip pre-programed from pjrc, all of the other parts are generic and can be purchased from anywhere.
    • A
      Surely I can't be the only person thinking that a teensy isn't the correct way to solve this. A hardware based solution using an FPGA or even a handful of discrete logic gates is going to be far simpler while giving more consistent and reliable...
    • A
      End of braking is far less critical. Being slightly off on the time to stop adding distance doesn't make much difference when you are going slowly. It's that start of braking that matters. And do you want when they first press the peddle/handle...
    • A
      Will you have an indication available telling you when the brakes are applied? Some sort of signal you can hook into (probably with lots of protection to prevent it blowing up the processor) that can be used to tell you when to start measuring...
    • A
      The Racelogic systems generally use the velocity based methods for calculating stopping distance. The professional grade products use a 100 Hz GNSS system and have the option of also integrating inertial measurements. In that situation RTK...
    • A
      Because GPS speed isn't based on position change. GPS calculates speed based on the doppler shift of the signals. If you know where the satellites are and the component of your velocity towards or away from them then you can calculate your...
    • A
      AndyA replied to the thread Low-pass filter problem.
      FTDI make a series of cables that are TTL level UARTs (So suitable for connection directly to a teensy serial port) on one end and USB-A on the other. To the PC they appear to be a COM port just like any other serial device. This would allow you...
    • A
      AndyA replied to the thread SD logger issues.
      One thing to add to the previous comments, if you're logging a busy bus (it looks like your bus load is fairly high) then you may want to look at reducing the number of calls to snprintf() in your CAN to text output formatting. This is more an...
    • A
      AndyA reacted to jmarsh's post in the thread Voltage when changing from input to output with Like Like.
      Some of the info in the above posts might need to be clarified a bit. Using digitalWrite() while a pin is not in OUTPUT mode will not set the future output level. This is because historically, Arduino did not have INPUT_PULLUP and INPUT_PULLDOWN...
    • A
      For shorter distances integrating velocity works a lot better than change in position. For cars this is certainly the case, you can get far more accurate measurements using the velocity method. But it does depend on how quickly you stop, the...
    • A
      Or an N channel MOSFET, no resistor needed. That would invert the signal but that should be simple to cope with in code. But this is assuming the driver pullup is enabled, the diagram indicates that it's optional or switchable to a pull down.
    • A
      Yes. The current draw for those parts is low enough that taking it from the Teensy 5V pin (which is basically the 5V from the USB) shouldn't be an issue. Just don't try powering a motor off the Teensy power pins. Ideally you should also put a...
    • A
      In HardwareSerial.h, you could try changing the variables below if you want to use a buffer > 64K. As an alternative, though, check out the TeensySdioLogger example in SdFat. It shows how to use SdFat's Ringbuf class and isBusy() to entirely...
  • Loading…
  • Loading…
Back
Top