Search results

  1. Q

    Teensyduino 1.53 Beta #2

    I loaded 153B2 into Platformio and tested a program that requires multiple std::vector arrays. Previously, the program would function correctly with one vector defined, but would not compile with multiple vectors. I'm happy to report that my program now compiles and behaves correctly with...
  2. Q

    Teensy 4.0 STD Library Compilation Failure

    defragster, thanks for your info on this quirk. It's more of a "what the heck" moment than a show stopper, but I thought I'd share what I'd discovered.
  3. Q

    Teensy 4.0 STD Library Compilation Failure

    i can appreciate that, but the fact that compilation is successful for some optimize options and not others implies .ARM.exidx is not implemented for all optimizations. Or, am I over thinking this?
  4. Q

    Teensy 4.0 STD Library Compilation Failure

    I was messing around with code the other day and I came upon a weird compilation error. If I compiled code using std::vector, compilation was successful if I optimized for Faster, Fastest, or Smallest Code. Compilation failed if optimized for Fast, or Debug. The proof-of-concept below will...
  5. Q

    Teensyduino 1.49 Released

    Paul, thanks for the explanation.
  6. Q

    Teensyduino 1.49 Released

    Sorry, Teensy 4.0 CPU speed and compiler optimization do not matter. Compilation on an empty sketch is always "Global variables use 41660 bytes (7%) of dynamic memory, leaving 482628 bytes for local variables. Maximum is 524288 bytes." All of my projects tested, so far, compile and run as...
  7. Q

    Teensyduino 1.49 Released

    Just installed on a Mac with Catalina. All is well except I have a question. An empty sketch consumes 41660 bytes of global memory. This is the same as for Beta 5. Have debugging tools been left enabled? It seems quite high to me.
  8. Q

    T4 rtc setting with time change

    I've got the same T4 DST bug running Arduino 1.8.10, Teensyduino 148 with Mac OS Catalina. With the RTC battery disconnected, the T4 resets the date and time to 0, but when I upload an program using the RTC, Serial.println(__TIME__) returns MST, and the RTC returns MDT. POC code below shows...
  9. Q

    Teensyduino 1.48 Released

    i don't necessarily agree with you. Installing Arduino,1.8.10,and Teensyduino 148 will run under Catalina in a standard user account without problems, but you must first install Arduino and Tennsyduino in an admin account. Installing in a standard uaer account and giving the install admin...
  10. Q

    Teensy4 IntervalTimer Channels Problem

    Thanks for the update. I took a look at the change in startup.c. Interesting that it was PIT channel three causing the problem. Update: i was looking at a file showing changes only and it didn't show the entire fix. I see the fix is actually your entire recommendation.
  11. Q

    Teensy4 IntervalTimer Channels Problem

    I stuck it in the resetHandler function. Because, I don't like modifying core files, and until there's a production fix to IntervalTimer, I'm putting the fix into the beginning of setup(). It works, and the appropriate comments identify why it's included in the code.
  12. Q

    Teensy4 IntervalTimer Channels Problem

    Manitou, thanks for the update.
  13. Q

    Bit math: Why isn't bitClear,bitSet and similar READABLE functions used more?

    I have to agree with tonton on this. Readability of bit operators is explicit and cannot be confused. Functions are black boxes -- you know input and output; that is all. Copious comments can also be counter-productive. Comments should be exact and precise, but that does not necessarily mean...
  14. Q

    Teensy4 IntervalTimer Channels Problem

    Installed the patch below into Teensy4 core startup.c file's ResetHandler() function. Ran my IntervalTimer test previously posted on this thread and all 4 channels behave correctly. // manitou suggested PIT fix CCM_CCGR1 |= CCM_CCGR1_PIT(CCM_CCGR_ON); PIT_TCTRL0 = 0; PIT_TCTRL1 = 0...
  15. Q

    Teensy 4 & rtc_second interrupt

    Hi manitou, I've taken a break from PIT to resolve the Teensy3 to Teensy4 rtc_seconds_isr problem. I took your rtchp.ino test code and reduced it to generate an interrupt once per second. I wrote a P-O-C to prove it performs as expected. The output is triggered by the rtc_seconds_isr that...
  16. Q

    Teensy4 IntervalTimer Channels Problem

    Thanks for keeping me informed. It would seem you've encountered quite the rabbit hole. I've been reading Ch. 52 of the Ref. Manual, trying to get a better understanding of PIT, but I also need a better understanding of the Teensy4 core as well.
  17. Q

    Teensy4 IntervalTimer Channels Problem

    In the IntervalTimer code, I created a constructor that initializes the PIT timer and I cleared TCTRCL0 and TCTRL1 to 0. manitou indicated that only those first two flags were not being cleared. In the beginCycles() method, I commented out 'CCM_CCGR1 |= CCM_CCGR1_PIT(CCM_CCGR_ON)' and 'PIT_MCR...
  18. Q

    Teensy4 IntervalTimer Channels Problem

    manitou, Out of curiosity, I created a class to play around with PIT. It's a very basic version of IntervalTimer, but I can get all 4 channels running without having to anything funny. The code snippet below shows the class constructor with the normal PIT initialization and then the addChannel...
  19. Q

    Teensy4 IntervalTimer Channels Problem

    Looking forward to your observations...
  20. Q

    Teensy4 IntervalTimer Channels Problem

    hjd, I've been working with Teensy for almost a year now and I'm still learning new stuff every day. I should have moved to the Teensy platform years ago. Have fun.
  21. Q

    Teensy4 IntervalTimer Channels Problem

    manitou, ran your test sketch. Interesting observation about TCTRL0, and TCTRL1. Added your 'fix' to IntervalTimer and now my test sketch runs all four timers. Thank you for all your help.
  22. Q

    Teensy4 IntervalTimer Channels Problem

    hjd, thanks for the update. I'll give your code mods a try and let you know my results.
  23. Q

    Teensy4 IntervalTimer Channels Problem

    Just got my T4s this week and I'm putting th T4 through some basic tests. I wrote a very basic IntervalTime sketch using 4 channels of the IntervalTimer and discovered that it will only handle two channels. The other two (any combination of two) are ignored. Is this a known problem, or did I...
  24. Q

    Teensy 4 & rtc_second interrupt

    Hi bmiller, I ordered mine last Thursday, and I just got an email from Robin saying they were shipped today. I live in Edmonton, and typically stuff from PJRC takes 7+ days to get here. Still have lots of prep work to sort out.
  25. Q

    Teensy 4 & rtc_second interrupt

    Thanks manitou, all I need now are my T4s. There's only so much I can do without actually testing. Fingers crossed they'll arrive next week some time :-)
  26. Q

    Teensy 4 & rtc_second interrupt

    Paul, I located attachInterruptVector(), and it answered my question. Actually, in reality, it's made me do a lot more investigation, but what the heck, I don't have the Teensy 4's yet, so I've got time :-)
  27. Q

    Teensy 4 & rtc_second interrupt

    Thanks Paul. Is the vector number 63, the same as for Teensy 3.6? I've looked thru the Teensy4 core code, and I can't find a list of interrupt vectors like the Teensy3 in mk20dx128.c?
  28. Q

    Teensy 4 & rtc_second interrupt

    Thanks defragster, you've confirmed my suspicions.
  29. Q

    Teensy 4 & rtc_second interrupt

    I've ordered a couple of Teensy 4's, but until I receive them I've been playing around with possible problems I might encounter on current 3.6 programs migrating to 4.0. I use the rtc_second interrupt to trigger a call to rtc_get(), but it looks like the rtc_second interrupt is not currently...
  30. Q

    Teensy 3.5 vs Teensy 3.6 digital pins

    I've been playing around with the MCP23017 io expander and I've come across a conundrum. The data sheet says that the maximum i2c clock speed is 1.7 MHz. Using the i2c_t3 library and the Teensy 3.6, at 1.7 MHz I have a stable connection. But, with the Teensy 3.5, I can only obtain a stable...
  31. Q

    Teensy 3.6 installer + Arduino 1.8.8 + Mac OX = Error

    Arduino 1.8.8 has a bug and requires, at minimum, Mac OS X 10.12 (Sierra).
  32. Q

    Teensy 3.6 Overclocked to 256 MHz

    Paul, it was that thread that prompted me to run the test I did today. I do want to repeat the test using digitalWriteFast; I'm curious about the pin speed on my "big gun" as well. At the moment the 3.6 is in a breadboard and to be honest I'm afraid to remove it after the difficulty of...
  33. Q

    Teensy 3.6 Overclocked to 256 MHz

    That's in the plan, but I didn't have time to hook up my 500 MHz scope. The times posted were measured using the Analog Duscovery 2 which is hooked up for day to day stuff
  34. Q

    Teensy 3.6 Overclocked to 256 MHz

    Paul and Frank, I thought I'd try out the 256 MHz overclock. It works a treat. Did a simple series of digitalWrites in a loop to track the speed improvement vs the clock speed increase Rough numbers for a digitalWrite HIGH/LOW cycle 180 MHz ~ 167 ns 192 MHz ~ 155 ns 216 MHz ~ 138 ns 240 MHz ~...
  35. Q

    New Teensy 3.5 & 3.6 User Just Saying Hi

    My first experiences with programming were about learning assembler. C and (cough, cough) COBOL were on my plate a few years later. My interest with the ATmega328P and ATmega1284P cantered around maximizing their performance, which did involve a lot of "bare metal" AVR programming. Now, that...
  36. Q

    New Teensy 3.5 & 3.6 User Just Saying Hi

    Ah yes, the CDP1802 COSMAC. I played around with it when it was first released, because the idea of being able to drop the clock frequency to 0 intrigued me. Never did anything useful with it, because of the effort and resources being put into the Motorola 6800 series.
  37. Q

    New Teensy 3.5 & 3.6 User Just Saying Hi

    Citabria, in the few weeks I've been experimenting with the Teensy 3 series, I too have found them to be powerful tools. So far, I've been most impressed with the flexibility of the interrrupts and timers. Moving to Teensy has proven to be very worthwhile.
  38. Q

    Is size of int type correct?

    brtaylor, Thank you for sending me to that resource. In reading the page you sent me to, as well as glancing at a few other pages, it seems to be a useful site and I've bookmarked it for a more thorough read.
  39. Q

    Is size of int type correct?

    Agreed. Actually, you've just unknowingly answered a mental question of mine. Logically, if long long is 8 bytes, and long is 4 bytes, then int should be 2 bytes, but it's 4; only short is two.. Your comment "native int ..." is the old metaphorical "facepalm". That's why it's 4 bytes. Thanks...
  40. Q

    Is size of int type correct?

    Hi Frank, That's what I'm doing now. My mistake was relying on the use of the fundamental data types and not using those defined in stdint.h. Stupid decision!!!
  41. Q

    Is size of int type correct?

    El_supremo and Frank, Thanks for getting back back to me so quickly. I knew the move to 32 bit was going to cause some conversion problems with my 8 bit libraries, but I was a little surprised at int. I've always assumed that signed and unsigned int were 2 bytes in size. As Frank's link has...
  42. Q

    Is size of int type correct?

    I've been bashing my head for a bit, and I've discovered something confusing. I have been assuming the int type has a size of 2 bytes and I've discovered that it's 4. is this correct? Here is a small program showing the head scratcher. Normally, short and int have the same 2 byte size...
  43. Q

    Serial.printf Bug ?

    Thanks el_supremo & Frank B. I was pretty sure it was a charcter string overwrite issue; thanks for confirming my suspicions. Using const char arrays is definitely a better solution than that presented in the Time library. Frank, thanks for the hint on F(). My niavety on Teensy is certainly...
  44. Q

    Serial.printf Bug ?

    While playing with the Teensy 3.6, its internal RTC, and TimeLib, I came across something funny. In The code below, the first serial.printf prints the month twice, not the weekday and month Comment out that line, and uncomment the next two that separates the weekday and month into two separate...
  45. Q

    New Teensy 3.5 & 3.6 User Just Saying Hi

    I played with the 4004 and 4040 when they were first released, but It wasn't until the 6800 was released that I settled on Motorola. When the RCA6502 was first released I played with it thinking It may be useful for remote data logging, but I never got the project off the ground -- too many...
  46. Q

    New Teensy 3.5 & 3.6 User Just Saying Hi

    Hi Frank B My roots go a bit further into the past. I cut my micro-processor teeth on the Motorola 6800 series. Most of the production stuff was on the Motorola 68705 micro-controller. My career path took me away from micro-controllers, but I'm back, decades later, exploring the world of...
  47. Q

    New Teensy 3.5 & 3.6 User Just Saying Hi

    Hi All. After a fruitful few years with the ATmega1284P, I realized it was to time to move on. I have been intrigued with the Teensy platform for some time, and I finally purchased the Teensy 3.5 and 3.6. The two boards arrived a few days ago and I have been having a fantastic learning...
Back
Top