J
Reaction score
221

Latest activity Postings About

    • J
      jmarsh replied to the thread SD Card Write Speed Patterns.
      You might want to use 0xFF instead of zeroes. It may not make a difference (depending on how the SD works internally) but 0xFF (all bits set) is the state of practically all flash memory after it is erased. Programming flash can only "take bits...
    • J
      jmarsh replied to the thread SD Card Write Speed Patterns.
      Flash memory has programmable blocks (the minimum amount of data that can be written in one operation) and erasable blocks (the minimum amount of data that can be erased in one operation, required before it can be written). So the rough "shape"...
    • J
      jmarsh replied to the thread weird weird weird.
      That should not be the case. sizeof() rounds up to account for the required alignment - otherwise if you did something like "malloc(X*sizeof(OrderedValues))" some of them would end up with incorrect alignment. So in this case the size of the...
    • J
      The FlexIO data pins are fixed, you can't remap them using crossbars.
    • J
      jmarsh replied to the thread weird weird weird.
      Well if you're set on just dumping the raw struct contents to disk... I would suggest putting a version field at the start of the struct, and name the struct accordingly (e.g. ConfigV1). Then any time you change the layout, make it a new...
    • J
      jmarsh replied to the thread weird weird weird.
      I'd say it's a problem with how you're filling the struct with data from the SD card. It's not safe to just take the pointer of a struct and access it like an array; there may be padding bytes between members, and the format will shift around if...
    • J
      jmarsh replied to the thread weird weird weird.
      When you say "an SD card is present"... is this config struct being read from a file on the SD card?
    • J
      Bit hard to say since my crystal ball doesn't know which OS you're using. On windows it's under: %localappdata%/Arduino15/packages/teensy/hardware/avr/$(SOME_NUMBERS_MATCHING_THE_TEENSYDUINO_VERSION)/libraries/Audio
    • J
      %lf shouldn't do anything / may not be recognized. %f is already the format specifier for a double, as floats get promoted to doubles when passed to a function that uses variadic arguments.
    • J
      Judging from the screenshot of the hardware properties, the enhanced port is interface 0 and the standard port is interface 1. From what I can tell the CP210x driver in the USBHost_t36 library only uses interface 0, it would require a bunch of...
    • J
      5.1k pulldown is standard for ports on devices (ports that want power). 50k pullup is used on host ports (ports that supply power).
    • J
      @Dogbone06 are the CC pins on the USB Host port left unconnected? They should really have ~50K pull-ups connected to 5V to properly look like a host port to usb-c capable devices.
    • J
      I've heard on the grapevine that newlib-nano also cannot printf 64-bit integers (long longs in the Teensy world), is anyone able to confirm/deny that?
    • J
      The compiler would unroll the inner loops making the argument a constant. So it's the same as the last test except multiplied by SOME_NUM (3)... which is reflected in the timings.
    • J
      Pretty sure __builtin_constant_p(mypin) would evaluate to 1 in that case because the compiler can see that its value is never modified. Making it a (non-static) global may work around that (but it also might not, compiler can be pretty smart...).
    • J
      Teensyduino 1.59 moved non-standard member functions (like addMemoryForRead) out of the HardwareSerial class, if you want to use those you need to expliclty use HardwareSerialIMXRT instead.
    • J
      I believe digitalWriteFast/digitalReadFast are only intended to be used with (compile-time) constant arguments and the non-const cases are only there for completeness. They're not meant to be called with variable pin values because that gives no...
    • J
      The key part is "the Teensyduino USB keyboard code requests the interval to be every frame". One microframe = 0.125ms. One frame = 8 microframes = 1ms. Most keyboards/mice sold today are still only full speed devices. There's really no need for...
    • J
      Something I just noticed: on PJRC's T4 schematic, EMC_01 is shown connected to PTA1 on the bootloader. On the SDRAM board EMC_01 goes to the SDRAM... and judging from the schematic, PTA1 is left floating?
      • PTA1.png
    • J
      If you wanted to add another SDRAM, you just tap most of the existing signals and take a new CS from one of the SEMC CSX pins. Think of it like SPI with loads more pins, and the restriction that the track lengths need to all match each other as...
    • J
      jmarsh replied to the thread I'd like to file a complaint /s.
      On double-checking it's a class printf method that forwards to ::printf(). And yes for the love of god, can we turn off the obnoxious auto smiley crap that the forum software inserts. It's a plague that haunts every forum dealing with c++...
    • J
      jmarsh replied to the thread I'd like to file a complaint /s.
      Hmm if it's turned off why am I still seeing those exact warnings sometimes? Would it not be possible to change the newlib definitions of int32_t/uint32_t to int instead of long?
    • J
      jmarsh replied to the thread 64 bit Flotingpoint.
      It's (roughly) half as fast as 32-bit floating point and takes up double the memory, so better to not use it unless you need the precision.
    • J
      jmarsh replied to the thread 64 bit Flotingpoint.
      I mean... it's not wrong, but if OP is asking about the Teensy 4 that advice isn't particularly useful. To perform 64-bit math all you have to do is use doubles, e.g.: double a = 1.0; double b = 2.0; double c = a + b;
    • J
      Probably not. I use it because Paul refused my proposal to let libraries use the startup-hooks.
    • J
      The SDRAM can be initialized by the NXP bootrom, so it's ready to go before any of the Teensy startup code even begins. Example code here: https://github.com/A-Dunstan/SDRAM_EXTMEM/blob/master/examples/DCD_Init/dcd.cpp It's a bit tricky but it's...
    • J
      The CH703X chips are no good; they use onboard ram, so they're a) slow and b) limited to what the chips knows how to output, which is usually something like 1366x768 or other sub-1080p resolution. What I'm thinking of is a proper RGB/YUY2->HDMI...
    • J
      Not if they're displays that use on-board RAM, because LCDIF is meant for direct rendering. Is it time to start trying to talk people into designing/building a HDMI encoder board?
    • J
      jmarsh replied to the thread CGA/EGA to VGA converter.
      I don't think you need a microcontroller to do this? The CGA lines are digital so you can just use resistor ladders to convert them to (VGA level) analog. If the Teensy was in the middle all it would be doing is acting as a buffer (introducing...
    • J
      Ok for the case where the GREEN linked pads are bridged: imagine the board is being powered by 5V direct to one of the broken out 5V pins, with nothing connected to the (non-host) USB port. There will be no voltage on USB_VIN so USB_VIN1 will get...
    • J
      Yes. I can't read the writing on the 3 pads so I'll refer to the one connected to the diode anode as pad 1. I think it should be connected to the diode cathode instead, so that USB Host still gets power when the board is powered by 5V supply...
    • J
      One very minor thing (don't kill me): looking at the USB Host power, should the 5V be taken from the other side of the diode? Since otherwise if the board is powered directly via the 5V pins (without a PC connected to the USB), the USB host port...
    • J
      About the DQS cap... assuming it's not too late and Dogbone hasn't done the order already, looking back over the testing I would suggest using a 10pf cap rather than just the floating trace. We do know that it is sensitive to length, and there is...
    • J
      The section you're referring to is for a QPI read, but the flash chip isn't in QPI mode. Instead it uses "Fast Read Quad I/O Instruction": The M7-M0 bits aren't used so there's 6 dummy cycles total.
      • t4_nor_read.png
    • J
      Bit of a long shot but I figure it can't hurt to ask... Has anyone else tried to use the FRINDEX register of the USB controller in host mode on the T4? It only seems to update when the frame changes rather than every microframe (e.g. the lowest 3...
    • J
      What I mean is B0_12 is pin 32 for T41, T40 and the micromod. There's no reason to give it a new pin number. Same goes for AD_B1_14, it is already pin 26 for all models.
    • J
      B0_13 should not be marked pin 25, that would be AD_B0_13 (if it was routed). So B0_13 is another without a number. @KurtE B0_12 is pin 32 on the micromod, not sure why your spreadsheet gives it a new number and says 32 is for T4.1 only?
    • J
      Ah in that case the numbers from the Pin column. I don't think we care about the MM physical hardware pin numbers.
    • J
      Aren't those the same thing? It's a micromod board so those would be the numbers to use... and the pins that the micromod doesn't have, I guess would use whatever numbers Kurt has given them in his stuff. Can you remove the "BATT_VIN" label on...
    • J
      quick fix: change occurences of "HardwareSerial" to "HardwareSerialIMXRT". Proper fix: contact the author of the project and tell them to update their code to match Teensyduino updates. (Note that there is a comment at the top of the source code...
    • J
      jmarsh replied to the thread I'd like to file a complaint /s.
      I know I've started seeing some warnings about printf arguments not matching their format specifiers (typically when a uint32_t/int32_t is passed for %u/%d without a long specifier)... is that not a thing that is turned on with the default...
    • J
      • tmode.png
    • J
      jmarsh replied to the thread I'd like to file a complaint /s.
      Was it "%s\n", or some other variation containing %s? I could understand the former causing a crash if the compiler silently changed the printf() to puts(), as it tends to do...
    • J
      jmarsh replied to the thread I'd like to file a complaint /s.
      Ok but they need two variables...
    • J
      jmarsh replied to the thread I'd like to file a complaint /s.
      Both printfs seem to be missing variables? (They only have the format string as a single argument)
    • J
      If that's the only purpose for counting the pulses, you're better off using one of the timer modules that can generate a single interrupt when the total is reached rather than 5 million individual interrupts.
    • J
      The idea of adding more chips with additional CS lines won't work; FlexSPI only supports two devices. The only practical option for more RAM is using the SEMC module (which uses mostly parallel-type memories rather than serial) and for that...
    • J
      jmarsh reacted to shawn's post in the thread SQLite Library (VFS) for Teensy 4.1 with Like Like.
      I just made a PR to add setting errno to LittleFS: https://github.com/PaulStoffregen/LittleFS/pull/58 Comments and suggestions welcome.
    • J
      I had no luck with bluetooth in the USBHost_t36 library because even though it checks for supported features, it always issues LE commands regardless during initialization which fail on hosts that don't support it.
    • J
      You could use the late hook function: // extern "C" only need if this is used in a c++ file extern "C" void startup_late_hook(void) { // measure A8/pin 22 here } The Teensy's startup code will call this function right before it initializes...
  • Loading…
  • Loading…
Back
Top