J
Reaction score
357

Latest activity Postings About

    • J
      Sounds like a bug in platformio's Teensy linker script.
    • J
      Now hang on a moment... p1 is also a global variable and the ISR is using it to track the current write position? How does that work when loop() is constantly resetting it to the beginning, regardless of whether bufferdone is set or not? This...
    • J
      jmarsh replied to the thread Problem with PSRAM.
      EXTMEM variables can't be statically initialized (to any value except 0).
    • J
      I think that's mainly because it's more flexible (allows any pin to be used as CS) and it's how the regular arduino SPI library was designed. Teensy's SPI library does have a setCS() method to configure a CS pin to be driven by the SPI module -...
    • J
      Which pin are you using for CS? I'm pretty sure it would have to be one of the specific SPI hardware CS pins for this to work, but also I'm not sure if this capability is included in the SPI library.
    • J
      And what is value1? How do we know if it's statically or dynamically allocated, which region of memory it exists in and if it's cacheable? How can we know it's not being overwritten by some code overruning a buffer stored next to it? How do we...
    • J
      You need to post at least enough code so that it can be compiled. We can't see how most of the variables are declared or know what their types are, we can't see where/how bufferdone is being set, we don't know how the value1 array is being...
    • J
      You can write using this method as well (writing is faster than reading because there are no delay cycles required), I just didn't include the code for it in the example. You can't use this method at the same time as FlexSPI access because the...
    • J
      Only like any other SPI device. You have to manually call functions to read and write to it rather than it being memory-mapped.
    • J
      Yes... rewrite it because references don't work the way that code intends them. References can only be "bound" at creation, so static SPIClass& SPIPORT = SPI; mean SPIPORT will always refer to SPI. When the SerialFlashChip::begin() later tries...
    • J
      Sequential reading is much simpler/faster because the address only needs to be sent at the beginning. Then as long as you keep clocking the PSRAM (two instructions) it will keep delivering nibbles from sequential locations. What really piques my...
    • J
      A small note about this: free() will internally check if the argument is NULL so you don't need to explicitly do it beforehand.
    • J
      That makes perfect sense, the temperature monitor panic alarm is set at 90 degrees to protect it from damage. You could disable it but it's not likely to survive operating at that temperature.
    • J
      Teensy's startup code by default turns on temperature monitoring. If you use the tempmonGetTemp() function to get the current internal temperature, what values are you seeing?
    • J
      Revisiting the original problem 4+ years later... Looking at code from a different project, something very obvious occurred to me: why not bitbang the PSRAM instead of using FlexSPI? I took the code from earlier posts and modified it: #include...
    • J
      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...
    • J
      jmarsh replied to the thread SAI3 Audio alternate pins.
      You don't seem to be setting the selector registers (*_SELECT_INPUT_0) for all the pins? So some of them will still be trying to use the EMC_* pins instead of SD_B1_*. Setting the pre and post divider for the SAI3 clock needs to be done in...
    • J
      How are you connecting the probes when measuring (CLOCK_H) - (CLOCK_L) ? It looks like CLOCK_L is being grounded...
    • J
      Are you asking how to check if something else is driving the line before you switch the pinmode to OUTPUT?
    • J
      Judging by the crossed-out padlock in the URL, might be a http vs https issue?
    • J
      From what I gather, they're trying to generate some sort of TMDS signal using two GPIOs. The pink trace in the first picture is generated using a T3.5 but using the same code on a T4.1 is failing and generating the green trace.
    • J
      If they didn't the default Blink sketch (that turns the onboard LED on and off) wouldn't even work. You are not giving us proper information here, which makes it very difficult for anyone to help you. You need to give a proper description of...
    • J
      Why are you using two pins to output a clock signal instead of just one?
    • J
      Just to confirm: you're using a Teensy 4.1 that has the ethernet chip onboard?
    • J
      Contrary to what that page says ("Servo is included with Arduino") there is a copy of the Servo library included in Teensyduino. It doesn't have anything like the error message reported by OP in Servo.h so I guess they must have a different copy...
    • J
      It should not be needed, volatile FPU registers will be saved if any ISR accesses them.
    • J
      I don't see how it is wrong. RAM1 is divided into ITCM and DTCM. The size used for ITCM is the same for both builds (32KB), but when PSTR is used there is less allocated data in DTCM so more space remains for local variables (stack).
    • J
      It has the same issue, you are using an identical string in multiple places which would be replaced with one copy by the compiler if and only if the string is treated like a proper string literal and not wrapped with PSTR.
    • J
      I have no idea what your ConfigError function does so no context for how the strings are used. Maybe they're ignored completely and the compiler is discarding them. Otherwise the strings appear to all be identical so the compiler would be...
    • J
      Yeah PSTR has a habit of triggering that error quite often. I don't fully understand why, suspect it's some c++/compiler bug. It's really unhelpful that GCC won't actually state what the conflict is between the different section declarations...
    • J
      That thread is bad advice because it no longer applies. Constant strings are stored in flash, but they also get copied into memory (and hence take up space) at startup by default. On the Teensy 4.x the F() macro does nothing - forget about using...
    • J
      jmarsh replied to the thread SerialUSB1 faster than Stream*.
      The usb_serial_classX classes definitely have their own override. It's right there in the usb_serial.h header: virtual size_t write(const uint8_t *buffer, size_t size) { return usb_serial_write(buffer, size); } So that's why using the serial...
    • J
      jmarsh replied to the thread SerialUSB1 faster than Stream*.
      IIRC there were issues at one point with optional interface methods either not being implemented or not matching the correct signatures, so sending/receiving blocks of data caused a fallback to the default Stream methods that read/write one byte...
    • J
      "Write time" doesn't necessarily include erase time.
    • J
      It's a 100megabit ethernet port so with 8 bits per byte plus overheads you're not going to see much faster than 10MB/s.
    • J
      jmarsh replied to the thread Teensy 4.1 Serial (USB port).
      How exactly are you connecting the USB ports of the Teensy and CR350 together? I suspect they're both device ports, which can only be connected to host ports.
    • J
      jmarsh replied to the thread MTP file size limits..
      I think the SD card in particular might be more prone to showing issues when switching cards, since there is only one static SD FS object that gets reused when a different card gets inserted. MTP would occasionally hold open the file handle of...
    • J
      jmarsh replied to the thread MTP file size limits..
      Does all this testing involve removing one drive and replacing it with a different one instead? This was one of the major headaches I had when I played with it, because the disk contents was cached and MTP would present the wrong files to the...
    • J
      There is a pull request to add a serial number parameter to teensy-cli to handle this: https://github.com/PaulStoffregen/teensy_loader_cli/pull/57
    • J
      Just to be sure I would add asm volatile("dmb"); after the digitalWriteFast statement that sets the pin low, to ensure that operation has completed before the end of the ISR. And also move it out of the if clause; you are unconditionally setting...
    • J
      jmarsh replied to the thread MTP file size limits..
      Retrieving/assigning the volume label, for one thing. Also retrieving the max supported filename length and checking if the FS is read-only without actually attempting to write something. What I would propose is one simple extendable general...
    • J
      This is a problem with the TeensyVariablePlayback code, it has "using namespace std;" in a header which causes type collisions.
    • J
      jmarsh replied to the thread XInput with USB Serial possible?.
      I doubt you can just mash the interface descriptors together and still have it be recognized as both devices, especially because a real xbox pad wouldn't have a serial interface attached but also because the driver would claim the entire device.
    • J
      jmarsh replied to the thread MTP file size limits..
      If you wanted to try a different USB mass storage implementation, I have an MTP sample in my repo. I added extra handling to try to make it gracefully handle the device being hotplugged although there are still issues that can only be addressed...
    • J
      jmarsh replied to the thread Boot loader blinks 9 times.
      You might be thinking of a recent fix for USBHost that had some functions not marked as pure virtual, which caused build errors when targetting Debug. The problem with the Wire library sounds like indeterminate static initialization order which...
    • J
      jmarsh replied to the thread MTP file size limits..
      I have wondered for a while if the FS class should have some sort of FriendlyName() function that identifies the underlying filesystem type, or maybe a generic ioctl() function that would allow individual FS implementations to support additional...
    • J
      In that case the information it gives wouldn't be worth anything, since different compiler options can greatly influence what gets included in the final build vs what gets optimized away. Even the way structures are packed can be changed by...
    • J
      How did you wire up the DigitalReadSerial example with the Teensy?
    • J
      What would be the point of disabling the check? The program still wouldn't fit in the flash memory.
    • J
      jmarsh replied to the thread MTP file size limits..
      It's not. If the size is >=4GB the compressed object size should be set to 0xFFFFFFFF and the actual size retrieved using SendObjectPropertyList (which uses two 32-bit size fields, upper and lower halves of a 64-bit value). There's also an...
  • Loading…
  • Loading…
Back
Top