A
Reaction score
43

Latest activity Postings About

    • A
      RS232 transceivers invert the signal, level shifters don't. Are you sure things aren't getting inverted? Check on the uart logic level pins, things should be idling high, if the idle voltage is low then you have an inversion going on. Or check...
    • A
      To answer your question - dynamic memory allocation is fine. It's generally avoided whenever possible for embedded systems except on start-up but this is more for system speed and stability reasons rather than because it doesn't work. As has...
    • A
      int8_t* testMe(uint8_t* myList) { //uint8_t* numList = new uint8_t[sizeof(myList)]; uint8_t* numList = (uint8_t*)malloc(sizeof(myList)); // effectively the same as the above statement memcpy(numList, myList, sizeof(myList))...
    • A
      You need to add the RC externally. If the PWM is at 1kHz then you want the time constant of the RC to be significantly longer than 1 ms. The longer the time constant the less ripple you'll get on the output, the trade off is that as well as...
    • A
      You have the output pin connected directly to the input pin? The output isn't a true analog output, it's a PWM pin where the duty cycle is set to the requested level. In order to convert this into an analog voltage you need to add an RC filter...
    • A
      To sort of answer the original question - I have managed to send a sustained 32 Mbits/s to the teensy over ethernet using the asyncTCP library, in testing I could push it up to around 50 without issues. This is receiving rather than sending so a...
    • A
      A 12 hour drive to fix something for a charity? I admire your dedication. Is there anyone local that could plug in to the units for you? If you can set them up with teensy loader on a computer then all you need to do is send them a new .hex file...
    • A
      It's probably sacrilege to say it here but if you want wifi in an arduino environment then unless you need the extra IO or processing power often ESP32 it a better route to take. On the networking side if you can put a standard wifi (or wired...
    • A
      Not that I'd have time either way but generally if someone tells me "I don't know the details of how to build something but I've picked the parts that should be used" then I run a mile.
    • A
      AndyA replied to the thread Teensy 4.1 CAN bus.
      At the risk of pointing out the obvious, CAN isn't like a UART, you can connect lots of devices to a single CAN bus. Assuming you don't run out of data rate capacity, have issues with multiple things using the same IDs, or have things that have...
    • A
      AndyA reacted to jmarsh's post in the thread Self made USB cable with Teensy41 with Like Like.
      You would still need to connect the grounds.
    • A
      AndyA replied to the thread DFU /Dual boot in teensy 4.0.
      You can load the image anywhere you want in flash. Running if from that location is a different matter. If the image doesn't start at the address specified in the linker then all the function addresses in flash will be incorrect. As soon as the...
    • A
      AndyA replied to the thread DFU /Dual boot in teensy 4.0.
      If it's dying in the disable cache function within the bootloader application then it can't be the linker side of how you are creating the binary image for your main application, it's not running that application at that point. It must be...
    • A
      AndyA replied to the thread DFU /Dual boot in teensy 4.0.
      I'm using the standard arduino build tools and process. To build with an offset I make two changes to files within the arduino teensy libraries. In imxrt1062_t41.ld I change the FLASH ORIGIN and LENGTH values by the offset I'm adding. In...
    • A
      AndyA replied to the thread Teensy 4.1 "dual boot" capability?.
      As the code above indicates in a comment before the function to disable the cache there are a number of includes or defines needs for the code to build correctly. Looking at my final implementation in the end I cheated a bit and rather than...
    • A
      AndyA reacted to brtaylor's post in the thread GPIO IRQ Priority on Teensy 4.1 with Like Like.
      For posterity, I wanted to decrease the priority of an interrupt attached to pin 35. So I added this to my setup(): IOMUXC_GPR_GPR27 = 0xEFFFFFFF; digital_pin_to_info_PGM[35] = {&GPIO2_DR, &CORE_PIN35_CONFIG, &CORE_PIN35_PADCONFIG...
    • A
      AndyA replied to the thread Teensy 4.1 HardwareSerial usage..
      That would only be needed for the first byte on each port. Once all the ports are running you could easily put the rest of the message in the tx buffers for each port long before the first byte has finished sending. But I suspect this doesn't...
    • A
      Hex is often used when dealing with hardware or fields that are a fixed size because each hex character represents 4 bits of binary. One byte will always be two hex characters. This fixed relationship makes calculating the number of binary bits...
    • A
      AndyA replied to the thread Teensy 4.1 HardwareSerial usage..
      Whether a transmit is due is only checked once per loop(). I'm guessing transmit time is more critical than your time of processing the receive so if main loop is good enough for transmit is should be good enough for the receive as well. If...
    • A
      AndyA replied to the thread Teensy 4.1 HardwareSerial usage..
      The hardware buffer is only 4 bytes but the HardwareSerial class automatically creates a 64 byte firmware buffer for each direction that is then sent/received using the hardware interrupts. I'd remove those flush commands. That is really only of...
    • A
      AndyA replied to the thread Faster digital write speed.
      Always run the scope probe in x10 mode. I've not yet come across a situation where there was a need to use x1 mode. The scope will normally have an option to take this into account in the voltages it displays. Every scope I've ever used has had...
    • A
      What is your drive voltage on the data signal into the LEDs? Going from memory here but the datasheet requirement for a valid high input is 0.8*Vcc so 4V. The Teensy IO pin high voltage is just under 3.3V. The LEDs will normally work with...
    • A
      AndyA reacted to joepasquariello's post in the thread Interrupt safe read. with Like Like.
      https://developer.arm.com/documentation/ddi0406/latest/Application-Level-Architecture/Application-Level-Memory-Model/Memory-types-and-attributes-and-the-memory-order-model/Atomicity-in-the-ARM-architecture
    • A
      AndyA replied to the thread Interrupt safe read..
      I would argue that it's only atomic if the value is correctly aligned to a 32 bit boundary. But the arm FPU provides a very handy way to verify whether that's the case. It generates a hard fault if you try using a float that isn't correctly...
    • A
      AndyA replied to the thread Using RAM1 & RAM2.
      The default is to use optimisation, all that option does is optimise things differently and trade off code speed for size. With the teensy speed isn't normally an issue. The entire point of the optimisation process is that the end result should...
    • A
      Your lines start with a timestamp? Change the printf to pad them with leading 0's so everything is the same length. cat log.txt | sort > logInTimeOrder.txt That does assume unix comand line tools (cat and sort specifically) are installed. But...
    • A
      Generally you shouldn't use printf inside ISRs. In addition to being fairly slow it's not thread / ISR safe and you can get some undefined behaviour. Instead store the values to be printed and set a flag, the background loop can then do the...
    • A
      Everyone has their own definition of what's hot :-) It will get warm but unless you're overclocking it it shouldn't get hot. It can hit the same temperature as the outside of a mug with a fresh tea/coffee in, it should never get to the point it's...
    • A
      Going by the bootloader chip diagnostics here: https://www.pjrc.com/store/ic_mkl02_t4.html 4 blinks would indicate an issue with the main processor clock. Which is an odd fault to get on a new device. No signs of any physical damage to the...
    • A
      Yes, most CAN interfaces (including the one in the Teensy) have the ability to create hardware filters to allow / block certain IDs so that the processor only gets notified about packets you care about. A quick look found this thread on using...
    • A
      AndyA reacted to thebigg's post in the thread Teensy 4.1 CAN Bus Problems with Like Like.
      Is there another device on the bus to ack the message? Without the ack it will just resend forever
    • A
      You can always add 8 / 16 MB of extra RAM by adding a PSRAM chip or two. That allow you to buffer a lot more data on the board either before or after. That's still only a few seconds worth at your rates so it may not be enough for everything but...
    • A
      Falling back to my default question when someone is having trouble implementing something tricky. Are you sure you need this? Why 1 kHz? How fast is the robot moving that you need 1kHz control and feedback to and from each node? Very little...
    • A
      This may be a silly question but why are you using freeRTOS? Reading an ADC and outputting the values on CAN doesn't require an RTOS. If this is a learning experience or required for some course then fair enough but if you are simply trying to...
    • A
      10 packets of 44 bytes per second is hardly a high data rate, it should be able to handle that with ease. Personally I'd start by making use of the Teensy41_AsyncTCP library. This will handle network events out of the main loop flow and so...
    • A
      AndyA replied to the thread SD card - deleting the oldest file.
      And ideally use strncpy() to avoid the risk of overflow no matter what filenames get thrown at you. const int filename_max_len = 32; char file_to_delete[filename_max_len+1]; file_to_delete[filename_max_len]=0; // ensure we always have a null...
    • A
      AndyA replied to the thread Teensy 4.1 & UART.
      Yes. You can use 8 UARTS plus extra memory and SD card.
    • A
      AndyA replied to the thread Teensy 4.1 & UART.
      No. Pins aren't completely flexible. There are normally more possible IO features than there are IO pins on the processor which means that some pins have to have more than one possible function. But then you hit the issue of what to do if you...
    • A
      AndyA replied to the thread Teensy 4.1 & UART.
      All the uarts should be available on standard pins. Port Tx Rx Serial 1 1 0 Serial 2 8 7 Serial 3 14 13 Serial 4 17 16 Serial 5 20 21 Serial 6 24 25 Serial 7 29 28 Serial 8 35 34 The greyed out pins you are looking at are...
    • A
      You look to have multiple power / ground pins connected together with a single via to the plane. This isn't ideal, it leads to extra inductance on the power input and shortest possible connections to the ground pins are important for heat sinking...
    • A
      The MCP2551 is a 5v device with a 5v on the logic pin. The Teensy 4.1 is not tolerant on its input, you will damage the Teensy if it receives 5v. Try and use the MCP2562 instead. It has a separate VIO pin for the logic.
    • A
      If you're using CAN3 you should initialize the FlexCAN Bus object like so: FlexCAN_T4<CAN3, RX_SIZE_256, TX_SIZE_16> canBus; // Teensy's built-in CAN3 Paul
    • A
      AndyA replied to the thread when teensy 5.0 will comming?.
      Agreed. We've used teensy for a number of small odds and ends - perfect fit to speed up development. We used it for one moderately complex project what needed lots of raw speed - generally went as well given the scope of the project. And we used...
    • A
      AndyA reacted to jerryk's post in the thread when teensy 5.0 will comming? with Like Like.
      I dearly hope that the Teensy 5 will have support for hardware debug.
    • A
      AndyA replied to the thread Custom USB option?.
      I have made it so the USB device switches from being a single serial port to being a dual serial plus mass storage device. Very handy for debug and automated testing, put the unit into debug mode and you have a dedicated debug command/status port...
    • A
      AndyA replied to the thread Custom USB option?.
      If you want to get really inventive it is even possible to change the USB type dynamically at run time but that's a lot more work since the descriptor structures can't just be #defines.
    • A
      AndyA replied to the thread CAN communication.
      Hopefully obvious but change that pull up resistor to pull to 3.3V not 5V, unlike the parts in that application note the teensy CAN Rx pin can't take 5V. With a 3k series resistor you probably aren't going to blow anything up but it is out of spec.
  • Loading…
  • Loading…
Back
Top