Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • TelephoneBill's Avatar
    Yesterday, 01:33 PM
    @defragster - This three phase example illustrates the point. It is derived from my previous "alternating compare" example, which is why Compare1 and Compare2 are both being used. I have not set Bit 14 (TCFIE) in...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-22-2019, 07:26 PM
    With QTimers, there are two "Status and Control" registers - for example, TMR3_SCTRL1 and TMR3_CSCTRL1. The first is the Status/Control for the timer as a whole. The second is the Status/Control for comparators. ...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-20-2019, 12:09 AM
    Been playing around again tonight with QTimers. Interesting idea of using QT3 in quadrature - employing QT3_Timer0 on pin 19 and QT3_Timer1 on pin 18. This example also uses the "Alternating Compare1 and Compare2"...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-17-2019, 07:49 PM
    Yes - I should use the symbols - even just to find any errors that might have crept in. I do find it educational, though, going through the registers bit by bit - it sticks in the brain better with me!
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-17-2019, 07:36 PM
    Not studied yet but there is a QUADRATURE option. One of the control bits can also invert. I did get a QUAD output from GPT2 as well. Set Compare1 for frequency, then Compare2 and Compare3 can be any integer "phase"...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-17-2019, 07:13 PM
    Gentlemen - Thankyou both. I could have stared at those ISR lines for days and not spotted it. So many other places where you write a '1' to clear a flag (familiarity breeds contempt). And the manual - can't see wood...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-17-2019, 04:42 PM
    I have run into T4 trouble while experimenting with a QTIMER QT3_0. I am making an assumption that QT3_0 is free to use? I am using the QTIMER as a simple upcounter from 0 to COMPARE1 and then reset 0. I want a...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-16-2019, 09:34 AM
    Seems that Post #2 is the situation.
    11 replies | 242 view(s)
  • TelephoneBill's Avatar
    07-15-2019, 01:36 PM
    With this week being the 50th anniversary of the Moon Landings, I thought I would share a picture of the "Teensy" I was using that same year. It was just over 12 inches long and 2 inches wide. But I'm sure Paul could...
    3 replies | 171 view(s)
  • TelephoneBill's Avatar
    07-15-2019, 10:11 AM
    Let the board cool down. Remove any SD Card or other attachments. Then attach to the USB socket and try running the attached "Bare Bones" sketch on your T3.6. It will flash the LED four times quickly on startup, then...
    11 replies | 242 view(s)
  • TelephoneBill's Avatar
    07-13-2019, 10:46 PM
    Re post #3691 on GPT2 Compare behaviour, once the "penny" has dropped, then the design implemented becomes much more comprehensible. The three Compare channels are not completely independant in "function", but may be...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-13-2019, 08:12 PM
    Thankyou for your diligence, and well spotted on the comment 51.1.1 and 51.1.2. I had missed that. Looks like you are correct - it is a "feature". On the diagram of Fig 51-1, it too shows a line only from Compare1...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-13-2019, 07:53 PM
    Here is a sketch which illustrates the quirky behaviour of GPT2 Compare3 and Compare2. Notice that it is only GPT2_OCR1 that determines the period/frequency of the output sq wave on a scope. Any value in GPT2_OCR3...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-13-2019, 04:07 PM
    ... And by the way, the value you need to put into "Compare 3" OCR3 or "Compare 2" OCR2 to get the square wave appear must be less than or equal to the value that you put into "Compare 1" OCR1. You can use a value of...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-13-2019, 03:49 PM
    I have done a lot of tests today. There is something VERY ODD about GPT2. I think its a design fault in the chip itself (either that or I am not understanding the way it is supposed to work). I have managed to "go...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-12-2019, 10:08 PM
    Thanks for the tip. I will try that. The reason I'm suspicious that something has changed is that I have - so far - been unable to "go backwards" and undo the mux that switched on the 150 MHz. Something else that is...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-12-2019, 09:06 PM
    I have suspicions tonight that my experiments with turning on 150 MHz for GPT timers may have damaged the chip internally. Until I can clarify this further, please will all beta users refrain from trying this for...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-11-2019, 07:57 PM
    @Manitou - Tried "DSB" and it made no difference. If I can summarize, using GPT2 it looks like this... If you only enable Compare2 using "GPT2_IR = 0x00000002;" then it ONLY WORKS (the ISR) if you put a value in the...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-11-2019, 07:01 PM
    I have not used "DSB", but will give it a try. Thanks for your reference - useful to see how someone else does it. I think the Compare1, 2 and 3 are completely independant of each other in their actions. If so, have...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-11-2019, 04:15 PM
    Interesting experience whilst experimenting with GPT1 and GPT2 today. Using the 150 MHz clock, I wrote a simple test to use GPT1 Compare1 to generate an interrupt every second. In the ISR, I reset the specific Status...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-10-2019, 03:25 PM
    @manitou - Yup, the RTC looks to be that little tin at the side of the reset button. Cute. I was mentally expecting a round long tin for RTC. Habits... The reason for lack of option 5 on GPT_CR clock selection is...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-09-2019, 07:06 PM
    Success now with 150 MHz peripheral clock available to GPT1 and GPT2, using bit 6 = 0 for CCM_CSCMR1. I gated/stopped both GPT2 clocks CG13, CG12 of CCM_CCGR0, also GPT1 clocks CG11,CG10 of CCM_CCGR1 while the change...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-09-2019, 03:16 PM
    Well, I've had one attempt to go for it... not succeeded yet. May take a little to figure out why not. I discovered that clock gating registers can upset the IDE and monitor, but managed to recover so far. Good ideas...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-09-2019, 09:44 AM
    @Paul - I'm still nervous about changing bit 6 which is CSCMR1. I can disable the PIT module with MDIS and set GPTn_CR control modules to zero, but I'm concerned that other modules may still be using this clock signal...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-08-2019, 09:33 AM
    Playing with GPT1 and GPT2, I found that the highest clock speed available in the Clock selections (powerup de facto) to be 24 MHz. I'm trying to make 150 MHz available for counting. Reading the 1060 RM, diagram Fig...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-07-2019, 11:37 AM
    @mjs513 - Thanks, it all helps. XBAR is a new area for me. Just reading the 1060 RM XBAR chapters, there is an intriguing statement 60.2.1 that "...any input (typically FROM external GPIO pin or internal modules) can...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-06-2019, 01:30 PM
    Thanks both for assistance and patience with my dumbness. That IOMUX chapter is cavenous. Big change from the T3 world on muxing. Example sketches with plenty comment lines are going to be essential to keep the queries...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-06-2019, 08:44 AM
    So many Timers, its a job knowing where to start. I'll experiment with them all and probe the features. Maybe make a writeup later to help T4 newcomers like myself. I notice that GPT are 32 bits length, whereas the...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-05-2019, 03:07 PM
    Just received a T4 Beta2. Can someone please point me at a post for the latest beta2 external pin ALT mappings? Thanks - not easy trawling through 141 pages of posts. (Imagine these pins will be in concrete now.) ...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    07-04-2019, 12:05 AM
    I have scanned through the 1050 ref manual, but cannot see any "digital capacitors" to adjust/nudge ppm of the 24 MHz Osc frequency. Does anyone know different? The Osc diagram shows external capacitors loading the...
    3830 replies | 392321 view(s)
  • TelephoneBill's Avatar
    06-26-2019, 07:26 PM
    Just performed another test string longhand... unsigned char TestData1 = {0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38}; The paper answer in 14 bit binary was "01 1010 0010 0010". Expressed as 14 bits held in 16 bits =...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-25-2019, 11:18 AM
    I'm finding the 7 bit and 14 bit worlds very cranky. Suddenly realised why I can't see any patterns in my Loran data... the Eurofix message structure is out of placement sync with the data when stored as 7 bits held in...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-23-2019, 07:16 AM
    Does "augmented" mean that you simply place the CRC first, before the message, when doing a longhand division by the polynomial (at the receiver)? Would you also agree that the "To compensate..." sentence is the same...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-22-2019, 01:47 PM
    I notice that your printed CRC14's have some values in excess of 14 bits. That cannot be right for a CRC based on 14 bit calculations? Methinks, the CRC cannot be a remainder if it is bigger than 14 bits, or else you...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-21-2019, 08:31 PM
    Timing of FastCRC... on my scope, it took 3.4 uSec to perform the CRC14.eloran call plus one DigitalWriteFast statement. That's a T3.5 running @180 MHz (and a very precise 180 MHz I might add, since the Teensy FTM1...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-21-2019, 04:17 PM
    Frank, Pete Using a T3.5, I made a test of CRC14.eloran just now and it worked brilliantly. The 56 bit test data was... uint8_t buf = {0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA}; and this gave the correct result of...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-21-2019, 07:01 AM
    @FrankB: Excellent news with 0x18,0x18,0x18 and the result 0x01D5. I don't have another verified (longhand) test string yet, but will make one later (busy all day today). The naming should reflect the ITU document...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-20-2019, 07:59 PM
    Yes, that solved the issue. Thanks for your patience. I note that you have a different polynomial to 0x60B1, so I will alter that when I do some tests. Going to try the same one as in #15 with just three bytes to get...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-20-2019, 07:06 PM
    Apologies. Can't get your example to compile. Keep getting "FastCRC14 does not name a type". Tried copying from github and putting 8 hours FastCRC.h in my program folder. Tried "Add File..." with a copy of the 8 hours...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-20-2019, 04:15 PM
    @el_supremo: I edited your code to remove the '82' and substituted 'data_length' instead, with 'int data_length' as the second parameter in the crc14 wrapper function. That meant I could then pass my own specified...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-20-2019, 12:04 PM
    Good work, Frank. (...for other readers DARC means DAta Radio Channel). In addition to LORAN, the Russians are said to have same Eurofix data encoding (hope its not cyrillic :o) with a system called CHAYKA. This page...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-20-2019, 08:41 AM
    I noticed a tiny glitch in your wrapper function in post #2, in case anyone copies it verbatim. You have left a fixed integer of '82' in your call to crc_gen_bits, instead of using the "length" parameter passed in...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-20-2019, 12:05 AM
    Frank, Pete - thanks very much for your interest and help. I'll tell you what I know so far. I'm on a steep learning curve... Each Eurofix "Message" format is 210 bits long - that's 30 times 7 bit characters. Its...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-19-2019, 01:08 PM
    Great stuff Pete. Will give it a try asap. Thanks too Frank - I will look at your work on FastCRC to see if I can mod for CRC14. I'm back working on LORAN C (eLORAN) to decode the Loran Data Channel. Its encoded with...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-18-2019, 07:02 PM
    Looking in the Freescale reference manuals, I spotted that the various chips have hardware CRC generation/checking capability. I'm looking to test 14 bit CRCs from a radio experiment. I notice that in the manual, the...
    36 replies | 932 view(s)
  • TelephoneBill's Avatar
    06-08-2019, 01:23 PM
    I seem to remember this does work, but it was some time ago that I tried it. I think I disabled the clock selection first before changing MOD, and re-enabled it after. There is a note in para 36.3.5 advises you to write...
    1 replies | 205 view(s)
  • TelephoneBill's Avatar
    06-05-2019, 01:49 PM
    Not the first time - I copied this code from elsewhere (can't remember where), which was an example of threshold of a small 200 mV peak 10 MHz signal. I'm only working at 100 KHz. Here is my snippet. //Enable...
    9 replies | 441 view(s)
  • TelephoneBill's Avatar
    06-02-2019, 10:08 AM
    Finally, here is an interesting application of the Teensy 3.5 comparator (CMP1). Its the detection of a LORAN C radio signal (see my previous work elsewhere in the forum). This signal is brief bursts of precision 100...
    9 replies | 441 view(s)
  • TelephoneBill's Avatar
    06-02-2019, 06:06 AM
    GOOD NEWS to report this morning... in fact, EXCELLENT NEWS as it turns out... Bad "Grounding" WAS the cause of trouble. Both boards now perform the same, and in fact exceedingly well, far better than I could have...
    9 replies | 441 view(s)
  • TelephoneBill's Avatar
    06-01-2019, 09:18 PM
    A few hours later. Have now done some tests on the second Teensy 3.5 board. Hmm... not quite straightforward. Put it into the same breadboard circuit as the first one, and at first showing it was behaving same as in...
    9 replies | 441 view(s)
  • TelephoneBill's Avatar
    06-01-2019, 07:11 PM
    I'm afraid to report BAD NEWS... (using CMP1 and not CMP0 here, so Pin 23 instead of Pin 11)... (1) I did a simple experiment first on CMP1. I put a 10 turn 10K pot across 3.3v and GND and fed the wiper (at 0 volts)...
    9 replies | 441 view(s)
  • TelephoneBill's Avatar
    06-01-2019, 12:30 PM
    I would like to experiment with the Teensy 3.5 comparators. I know that Teensy 3.5 has 5 volt tolerance on digital pins. Does this also apply if I map a comparator input to for example Port C6 (Teensy Pin 11)? I'm...
    9 replies | 441 view(s)
No More Results
About TelephoneBill

Basic Information

About TelephoneBill
Location:
UK

Statistics


Total Posts
Total Posts
263
Posts Per Day
0.16
Last Post
Teensy 4.0 First Beta Test Yesterday 01:33 PM
General Information
Last Activity
Yesterday 01:36 PM
Join Date
03-03-2015