Search results

  1. C

    optimizing SD write access

    Have you perhaps tried searching "sdcard sector size" in google, bing, duckduckgo, or whatever your favorite search engine is? The answer is that it's going to be at least 512 bytes per sector but it likely erases 256k at once. However, you don't need to exactly match the erase size. Just match...
  2. C

    Assistance with CAN FD Communication Setup in Senior Design Project Using Teensy 4.1

    There are many. MCP2562FD TJA1442 SN65HVD266 The thing with transceivers is that you buy one that meets your criteria and there are many to choose from. So, you should know what you want then go looking for a part that matches. Chances are these are the questions you should be asking 1...
  3. C

    Finding function in project with some flash only functions

    So, it's great that CrashReporter exists and it is possible to see a stack trace of where the program crashed. However, there is a problem. The usual advice to use addr2line only seems to work well if you don't put any functions into only flash. Usually the address given by the crashdump then...
  4. C

    Please help me, it's urgent.

    As KurtE said, you really should try to retrieve the crash dump to see if it was filled out with information about the reason for reset. You may be experiencing a brown out due to activating sensors. Or, you may be overflowing memory. Or, there could be a null pointer deref or any number of...
  5. C

    DMAMEM / RAM2 and detecting first boot after power on alternatively detecting warmboot

    Honestly, I think this subject is being over complicated. Conceptually, it needn't be this difficult. RAM2 is mostly uninitialized and persists across warm boots. As mentioned, the CrashReport interface uses RAM2 for storage of the breadcrumbs and other structures. These are not touched during a...
  6. C

    Serial.begin() not needed???

    For what it's worth, I use PlatformIO with a Teensy Micromod based project. I use Visual Studio Code. The serial monitor in this setup seems to do a pretty good job of automatically closing when the TeensyMM gets flashed then comes back automatically and reasonably quickly - something like 1-2...
  7. C

    Multiple apparently DOA new teensy MicroMods. Am I being dense??? "Old faithful" works fine.

    Yes, early on some MicroMods had improper soldering on the BGA chip and so they would work very poorly. Sometimes you can get them to work by pressing on the chip. Obviously that isn't super reassuring. I've certainly had it happen to me. It doesn't help that these boards are pretty thin so they...
  8. C

    usb-c format

    Only about 100%. ;) It's very common to put USB-C socket on modern devices but actually have the devices use USB2 hardware internally. This is a supported thing and tends to work fine. I think the board is supposed to have a couple of resistors on it but the end result is a USB2 device that...
  9. C

    My Teensy 3.6 had too much beer and needs help to regain its old self...

    Beer likely has conductive elements in it and that could be shorting out places on the board. I'd wash it thoroughly then let it dry. Contrary to popular belief, most circuit boards handle water just fine, so long as they aren't on. In fact, this is a great way to wash off flux when...
  10. C

    Teensy-Cli does not have Teensy 4.0

    If you do end up having to compile it, I'm going to shamelessly advocate you use the version I modified: https://github.com/collin80/teensy_loader_cli Why? Because I have confirmed support for all the newer versions (4, 4.1, MM), added more of the USB ids for things like dual and triple serial...
  11. C

    64 bit Flotingpoint

    But the problem for the clientele that tend to use the Arduino IDE is that not using double leads to situations that may bring them outside of their depth. I'm not trying to be condescending either. Everyone has varying levels of knowledge in various domains. No one is an expert in everything...
  12. C

    64 bit Flotingpoint

    The OP never did mention which board they are interested in using with 64 bit floating point. And, the simple answer is indeed to just use double. But, to cover things more fully, if you define a floating point constant or literal then putting f on the end makes it a single precision (32bit)...
  13. C

    Updating sketch remotely for end user updates

    As mentioned above, one of the easier ways is to use the Teensyloader CLI tool. Then you can distribute the teensyloader EXE, your firmware file, and a batch file that calls the CLI tool with the proper parameters. Voila, it updates. Now, this is complicated by a few things. For one, everyone...
  14. C

    libstdc++ exception handling (__verbose_terminate_handler) causing bloat in output binary

    I figured I may as well try this as well. Here is my program by default: teensy_size: Memory Usage on Teensy MicroMod: teensy_size: FLASH: code:337960, data:95104, headers:8276 free for files:16073732 teensy_size: RAM1: variables:140512, code:317912, padding:9768 free for local...
  15. C

    Extremely high RAM1 usage for code on Teensy 4.1, out of space in RAM1

    I'll throw in my hat as someone who has run into this exact problem and had to work around it. I was thrown for a loop for a while as my code was only something like 300k so it easily fit into the gargantuan amount of FLASH on a Teensy MicroMod and thus I wasn't concerned about it at all. Come...
  16. C

    GCC won't shut up about irrelevant ABI changes (needs "-Wno-psabi" ?)

    Yes, please. It's entirely obnoxious and I hate it. GCC should learn to shut up. I don't care that something or other changed in GCC 7.1 when we are *SEVERAL* versions ahead of that. Don't care at all. I really do wish the Teensy default compile options would turn that off. I've complained about...
  17. C

    CAN XL in Teensy 4.1

    The theoretical max speed of CAN-FD is 8Mb/s so what SK Pang got is as high as you're likely to see. CAN-FD can also have up to 64 byte payloads as opposed to CAN. CAN-XL is EXTREMELY NEW. I'm not even aware of any readily available hardware you could use to produce a CAN-XL board yourself -...
  18. C

    Senior Design Project Feasibility

    I understand why you'd be asked to do this: it gives you a MUCH better understanding of how the hardware works and how to do low-level programming. Sure it's entirely possible for you to write your own I2C and SPI drivers for the Teensy hardware. You don't need to get super fancy. Just...
  19. C

    Teensy 4.1 board with JTAG supported out-of-the-box?

    No. I believe the way PJRC boards work is that their proprietary bootloader chip is attached to the JTAG pins and can thus force software updates on the main MCU by flashing it over JTAG. So, you can't have connection to JTAG because the bootloader chip is already actively using those pins...
  20. C

    Crash when putting FlexCAN objects in RAM2

    I didn't expect that putting objects in RAM2 was a problem. I guess that was my mistake. When reading here https://www.pjrc.com/store/teensy40.html it plainly says that you must write the initial values as they can't be auto populated but I guess I didn't put two and two together to think that...
  21. C

    Crash when putting FlexCAN objects in RAM2

    Ok, so this might be a slightly weird one... I have a very large program that uses a whole lot of RAM. If I don't move some things to RAM2 then RAM1 overflows and the program dies. But, it seems when I use the below lines: DMAMEM FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> Can0; //Reg CAN or...
  22. C

    Teensy 4.1 "dual boot" capability?

    Yeah, sounds entirely possible. On the Due I wrote some routines to boot to one of two zones. This worked well because the Due has a selector bit that selects one of two banks upon start up so you can switch. You do then need for your interrupt vectors to point to the correct sketch which...
  23. C

    Help with Teensy Loader

    This may not help but it is seemingly somewhat related: I took the published teensy_cli_loader and fixed it up to correctly do automatic soft reboot on Windows and Linux (I copied someone else's solution for Windows so I don't want to really take credit for much of anything. I merely slapped...
  24. C

    Overflowing RAM

    yeah, I'm aware of ways to mitigate the problem. I originally posted to get help but midway through the post I figured it out. But, I felt it was still worth a post in the off chance that someone might find it while searching and read all our replies to get solutions to their problem. One thing...
  25. C

    Overflowing RAM

    I'm using Platform IO and it seems to be using the 1.58 version of the Teensy support files. Here is what is reported at the end of my compile: teensy_size: Memory Usage on Teensy MicroMod: teensy_size: FLASH: code:332920, data:94080, headers:8196 free for files:16079876 RAM1...
  26. C

    Writing Data to Teensy 4.1 microSD

    I would open the file once and then keep writing to it. That is, open it in setup, write to it in loop. You already have myFile as a global variable so this will work. Periodically you may then need to do myFile.flush() to make it actually write to the sdcard. Otherwise it will go to cache...
  27. C

    SDFAT non blocking write for Teensy 4.1

    There is a problem with async writes to SDCards though. It takes an indeterminate amount of time to write to an SDCard. Sometimes it is essentially the speed at which you can write across the interface. But, sometimes one or more sectors must be erased and bookkeeping needs to happen before more...
  28. C

    Thoughts on importance/need for encrypted firmware ie locked Teensy

    The other consideration is third party copies. Let's say your product gets popular. There is likely nothing that will stop a dedicated person from copying your circuit board and reading the ID numbers and letters on the tops of chips to reverse engineer the whole schematic. Now they print 10,000...
  29. C

    GCC 11

    Like kd5rxt-mark said, you might be getting a value from elsewhere. One thing that has helped me is realizing that modern Arduino has printf. So, it can be as simple as Serial.printf("retrySBDIX: %u\n", retrySBDIX); so that you're sure what you're looking at.
  30. C

    Please please please Consider a hardware debugging on the next Teensy revision

    The Teensy boards do have hardware debugging. In fact, it's hooked up and everything. The problem is that the PRJC boot chip is the one connected so there is no prevision for another device to also be on the JTAG pins. What may be the path of least resistance is if PJRC can make their boot chip...
  31. C

    comms over USB serial

    I wish I could remember where I saw discussion about this but I can't find it. Anyway, I believe you're correct about how it is implemented on a physical and low level. However, what happens is that your bulk transfers eventually have to go into the linux tty system itself. Then you can use...
  32. C

    comms over USB serial

    The problem is on the linux side. Yes, the Teensy 4.1 processor is capable of accessing the bus at full 480mbps speed. It won't ever really be able to saturate 480mbps for various reasons but it could do better than 4mbps by far. The problem is that ttyACM goes through the linux TTY system which...
  33. C

    teensy_cli_loader fails midway through .hex file upload

    1. No, that's probably right. The Teensy MicroMod I'm using has 16MB of flash and I believe the 4.1 does as well. So, with that amount of flash, it's entirely possible that you're using only 1.8% of it. 2. That is entirely possible. I have never overclocked over the 600MHz default. It is...
  34. C

    Implementing CAN communication between two ECU Simulators

    Do you have a question about that?
  35. C

    Teensy MicroMod PCB thickness increased

    Hmm. thanks for the heads up. 0.15mm thicker is only like 0.005" which is maybe the thickness of a sheet of paper but still that would certainly create a bigger problem with inserting them. I wonder if it provides a tighter, long lasting fit or if this could damage the M.2 slot?
  36. C

    Micromod + Teensyduino firmware upload question

    If you want to take a look at an existing program that uses FlasherX to do firmware updates from SDCard you can look at my code here: https://github.com/collin80/GEVCU7 Unfortunately, it may not be the simplest implementation. It is meant to be a primary vehicle control unit after all. But, it...
  37. C

    Micromod + Teensyduino firmware upload question

    Yes, that's a limitation with how the default Teensyduino loader works. However, there is a command line firmware uploader: https://github.com/PaulStoffregen/teensy_loader_cli That source code will compile and result in a command line tool you can use for flashing. Unfortunately, it doesn't...
  38. C

    OTA for teensy 4.1 using esp32?

    The FlasherX example does show how to do a firmware update over serial. It seems to me that this is basically the same thing we're doing over sdcard but over serial instead. So, I think the basic idea is as Joe outlined: 1. Get firmware from online to the ESP32. 2. Use a serial link from the...
  39. C

    MicroMod Beta Testing

    Yeah, unfortunately on Windows using addr2line might be really painful. On LINUX it's no problem at all because recent versions of GCC support multi-arch out of the box so the system addr2line works perfectly fine with ARM binaries. So, I just plain type "addr2line -e SomeFirmware.elf 0x1234" on...
  40. C

    MicroMod Beta Testing

    Use addr2line with the resulting ELF file from the compile and the address (0x9C1E) to get where it is crashing. I tried this myself. I don't have a micromod in suitable conditions to directly test but I compiled the sketch you attached above and then used addr2line on it. It says the crash is...
  41. C

    CAN FD to CAN Converter

    You will have to consider what you are trying to achieve by doing this. First a couple of points just to be sure we're on the same page: 1. CAN and CAN-FD traffic can exist on the same bus. If a standard CAN node sees CAN-FD messages it will consider them errors. However, CAN-FD transmitters...
  42. C

    MicroMod Beta Testing

    Yes, the PDF seems accurate to me. Also, I can confirm that the MicroMod has all three CAN buses available and they do all work.
  43. C

    Teensyduino 1.59 Beta #2

    I upgraded to Arduino IDE 2.1.0 and Teensycore 1.59 beta2. When trying to compile a sketch that uses TeensyTimerTool it fails with the below errors. You might point the finger at TeensyTimerTool but it appears to really be some sort of misinterpretation of the code found in 11.3.1/chrono as it...
  44. C

    Having a teensy 4.1 update its own firmware?

    This might be somewhat what you are looking for: https://github.com/joepasquariello/FlasherX I have used that code to be able to update a Teensy MicroMod from an SDCard. It is entirely possible to use it for OTA updates as well.
  45. C

    Rust on teensy 4.0

    I looked at the link to the program you want to load. Yes, you would have to compile it, that's just RUST code, not a compiled binary. I've investigated running rust programs on Teensy and it is possible but it is not a trivial thing to get set up. There are tutorials for how to install all the...
  46. C

    Fastest Way to Log to SD Card

    I also do logging to sdcard with a Teensy 4.1 (well, a Teensy MicroMod but it's the same chip as the 4.1 and also supports SDIO like you're using). I use a 16KB ring buffer to write into and then batch out in 512 byte increments as I believe this is the general size of a full sector write on an...
  47. C

    teensy_loader_cli fails every other time

    I've had similar troubles. One of the problems is that the official CLI tool does not support soft rebooting basically anywhere and so you need to push the reset button yourself to get it to happen. Various people on the forum, myself included, have modified the code to do soft reboots at least...
  48. C

    Teensyduino 1.58 Beta #3

    FWIW, I also am running Ubuntu 22.04 with an nVidia adapter (RTX2060 or something like that). It works fine for me but this is laptop and I don't want the nvidia power pig running all of the time. The nVidia control panel allows for "on-demand" nvidia which means it usually uses the built-in...
  49. C

    OS Planning for Teensy 4.1 - Just a Discussion

    Its a tempting idea but once you really think about it you find there isn't any point. If you want a small, embedded device that runs a full operating system then Raspberry Pi and BeagleBone boards already exist. They aren't that much money. They have more processor power, more RAM, an MMU, etc...
  50. C

    question about "common ground" and usb

    I don't see any reason you'd need a heavy load attached. You're just looking to see whether the grounds are common or not. Another way might be to check for resistance between the two grounds with everything off and unpowered. If they're common then the resistance will be nearly zero ohms
Back
Top