Search results

  1. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    It's at 8 seconds, and the callback disables some output pins. I suppose the callback function also crashes since everything is being overwritten.
  2. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    I experimented with large const arrays but that was all working fine... Then I realized that the large programs also have the watchdog timer (WDT1) active. I disabled that and it seems to complete fine now. So now I modified the flash_move function to take a function pointer that is called...
  3. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    I rely on the CAN protocol for the message integrity. CAN has a built-in CRC check and will automatically ask for a repeat message if needed. On top of that, I keep track of each message as the Teensy first replies to every message with the next address location. The host can then verify that...
  4. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    Because without disabling it, the result was always the same: Teensy freezes and is not recognized by TeensyLoader until after some "cool-down" time. I tried it in 2 different large programs and got the same result. By commenting it, I did manage to flash several times in a row, hence I...
  5. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    After some initial success, I get also unreliable behavior after commenting out the buffer erase part. Teensy hangs and on power cycle blinks 9 times on the red LED.
  6. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    I did that, but then I get the behaviour in my first post (freezes at address). I meant that I later commented out the part where the source buffer is erased (below "//move is complete"). Then the Teensy reboots into the new program fine every time, but the orange LED stayed on half-lit until...
  7. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    To be fair, I never checked if it actually clocks to below 24Mhz. But now I need to know :P I also commented out the part that erases the buffer in FlashTxx.c and on first test with the blinker sketch that worked. I'll report back tomorrow.
  8. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    Yes, would that make a difference? I haven't tried it at the default 600Mhz, will do. I'm using the EEPROM, but increased FLASH_RESERVE to (64*FLASH_SECTOR_SIZE), as I read that it then stays out of the top 256K used by the EEPROM emulation. I'll try your suggestion with full reset/upload/flasher.
  9. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    I didn't notice it getting any hotter, but I configured it to run at 16Mhz with set_arm_clock() The blinker test is 23552 bytes (upload) and the summary after compilation is teensy_size: Memory Usage on Teensy 4.1: teensy_size: FLASH: code:10532, data:4040, headers:8976 free for...
  10. K

    Teensy 4.1 & FlasherX with large project hangs in flash_move()

    I am integrating the FlasherX code into my own project to be able to flash over CANbus. For a small blinker application, this works reliably, but in my final application weird things start to happen. As test, I try to flash the blinker firmware when the larger application is running. After the...
  11. K

    ST7789V3 on Teensy 4.1 with ST7789_t3

    I got it to work. It had to be something very stupid... The display is supposed to be 3.3/5V tolerant and I feed it 5V. When connecting Vcc to 3.3V, it came to life immediately. In the past I used a similar Waveshare ILI9341 panel at 5V since the backlight LEDs were then a bit brighter. It...
  12. K

    ST7789V3 on Teensy 4.1 with ST7789_t3

    You're right, I uncommented both messages to see what parts are executed. I found an arduino library that should apply to this display at https://github.com/limengdu/XIAO_ST7789V3_LCD_Display/tree/main However, after fiddling with the included helloworld example, the display stays black. I...
  13. K

    ST7789V3 on Teensy 4.1 with ST7789_t3

    This particular display is 172x320, so I used tft.init(172, 320); But to be sure, I also tested with 240,320. #define TFT_MISO 12 #define TFT_MOSI 11 //a12 #define TFT_SCK 13 //a13 #define TFT_DC 9 #define TFT_CS 10 #define TFT_RST 8 ST7789_t3 tft = ST7789_t3(TFT_CS, TFT_DC...
  14. K

    ST7789V3 on Teensy 4.1 with ST7789_t3

    Hi, I am trying to get a Waveshare 1.47" LCD module to work using PaulStoffregen's ST7789_t3 library. (https://www.waveshare.com/1.47inch-lcd-module.htm) Unfortunately, the screen stays black, no matter what I tried (SPI0, SPI1, software-SPI). I'm starting to think the ST7789V3 is more recent...
  15. K

    Teensy 4.1 RTC get milliseconds correctly

    Thank you luni, I appreciate it very much! I have now started again from your code, and slowly added feature by feature and so far it is still working as it should. I noticed also that I was not servicing the FlexCAN_T4 events() fast enough and dropping CAN messages. I now put an intervaltimer...
  16. K

    Teensy 4.1 RTC get milliseconds correctly

    Thanks! The frozen time appears as soon as I start the teensy and start transmitting CAN messages from my laptop to it. I tried also reinserting the RTC battery to make sure, but no change. I let it run for a while and recorded each time the printed time would update: 23:55:59 23:58:17 00:00:34...
  17. K

    Teensy 4.1 RTC get milliseconds correctly

    Late reply, the car in which this was put was not nearby so I had to wait for it to return to base to continue :) Still breaking my head on this. I implemented your chrono-based method (which looks super clean btw), but I get timestamps that kind of "freeze". I'll try to illustrate this. In the...
  18. K

    Teensy 4.1 RTC get milliseconds correctly

    Thanks Luni, that is definately useful for me! At the moment I am seeing that the value from seconds() in the log file is stepping back and forth. E.g. 13:09:37, 13:09:37, 13:09:38 ... , 13:09:37, ... 13:09:38, ... 13:09:39 and so on. I added an example in attachment The data itself from the...
  19. K

    Teensy 4.1 RTC get milliseconds correctly

    For a CAN logger project, I am trying to get a reliable timestamp from the RTC with millisecond precision. I have found several topics on this and worked out some code from that, but I get erratic behaviour in the resulting log files. Sometimes, seconds jump back and forth and the log is...
  20. K

    Teensy 4.1 Freeze (~1786ms)

    Wow, I found this topic after days of struggling to isolate the semi-random lockups of my T4.1 dashboard. But sometimes they lasted >2mins, sometimes 4 secs. During a lockup, all interrupts were 'frozen', but CAN msgs kept being ACKd. After the change in startup.c, my tests ran the whole night...
  21. K

    Writing to T4 flexspi program flash

    I am trying to understand the flash writing code I found in the EEPROM emulation (https://github.com/PaulStoffregen/cores/blob/master/teensy4/eeprom.c) and the flasher4 OTA code. A lot is going on to set up the sequence LUT and IP command control registers, some of which I find very little...
  22. K

    CRC32 using Teensy4 DCP

    Thanks, it works now :o
  23. K

    CRC32 using Teensy4 DCP

    Thanks to clarify. I think it could still be useful for my purpose. With those parameters and the online test it looks to correspond with the CRC32 MPEG-2 variant. I am wondering though, if I double the message length to 64 in the example to e.g. static const uint8_t message[] =...
  24. K

    CRC32 using Teensy4 DCP

    I was looking into using the DCP to efficiently calculate CRC32 checksums. However, I can't really find documentation on how to configure and use this peripheral. The "i.MX RT1060 Processor Reference Manual" has a single paragraph on it in section 7.5, p.182, and in the teensyduino headers there...
  25. K

    Wire library versus TimerOne interrupt on Teensy 2

    Okay, I peeked in Wire.cpp and see what you mean. I'm a bit surprised why it would need interrupts at all, since the Wire read/write methods are supposed to be blocking anyway? I'll solve it with a global flag and read it in the main loop, as you suggested. Thanks for the help!
  26. K

    Wire library versus TimerOne interrupt on Teensy 2

    I'm trying to read data from a ST L3G4200D gyro, which is connected via 2-wire I2C to a Teensy2, on pins D0 and D1. I'm using the L3G library from https://github.com/pololu/l3g-arduino for convenience. Everything works fine as long as the call to the library's gyro.read() function is in the...
  27. K

    Teensy 3 Power-On Reset

    The PSU also feeds 144 WS2812B LEDs and an USB Host Shield with Xbox controller attached, so there is definately some idle load. I suppose looking at it on a scope would be best, but I don't have one nearby so that will have to wait :)
  28. K

    Teensy 3 Power-On Reset

    That is possible, but the POR circuit is supposed to keep the uC in reset until a high enough voltage V_lvdl of 1.6V is reached? The minimum supply voltage of the MK20DX128 is 1.71V according to the datasheet. That seems a little illogical... Anyway, can the 3.3V converter on the board be...
  29. K

    Teensy 3 Power-On Reset

    Yes, I got the power supply from here: http://www.ledsee.com/index.php/power-supply-s-adapters/150w-power-supply-5v-detail I can try to find a manufacturer name when I'm back home.
  30. K

    Teensy 3 Power-On Reset

    I'm using a Teensy 3 in combination with a 150W 5V switching PSU. When I power the Teensy from this 5V source, it doesn't do anything when switching on the PSU. It does work however when I first start up the PSU and then connect the Teensy's power. Does the Teensy have an internal Power-On...
Back
Top