Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • TelephoneBill's Avatar
    08-20-2019, 07:53 AM
    The 24 MHz crystal is situated close to the main chip and this will probably affect the "ambient temp" of the crystal module, either by convection - or possibly by conduction (in addition to room ambient changes). I...
    15 replies | 865 view(s)
  • TelephoneBill's Avatar
    08-19-2019, 04:44 PM
    I also wondered what peripherals might be already in use. I don't have any knowledge - perhaps one of the experts will point you in the right direction. Attached is some commented code on using GPT2. I chose GPT2...
    15 replies | 865 view(s)
  • TelephoneBill's Avatar
    08-19-2019, 11:09 AM
    @JBeale - You might find Beta Tests post #3578 and #3586 interesting. These refer to making the 150 MHz peripheral clock available for GPT2, which has a 32 bit counter. I worried about making program code changes to...
    15 replies | 865 view(s)
  • TelephoneBill's Avatar
    08-17-2019, 01:12 PM
    Thanks for your useful response. I have just been doing some more experiments with T4 and have further very good results which may be of interest. Appreciate that temperature is a key factor - and more of this in a...
    5 replies | 203 view(s)
  • TelephoneBill's Avatar
    08-17-2019, 09:44 AM
    When measuring the output frequency of a QTIMER on a T4, I found it to be 5ppm slow on the theoretical value. This will be attributable to the 24 MHz oscillator also being 5ppm slow (within spec and temperature...
    5 replies | 203 view(s)
  • TelephoneBill's Avatar
    08-14-2019, 11:46 PM
    I believe the keyword "volatile" provides some insurance. Against what? The compiler making assumptions that differ from my own. What is an ISR? Some code that might happen - but your'e never truly sure when....
    2 replies | 82 view(s)
  • TelephoneBill's Avatar
    08-14-2019, 07:16 PM
    So, in summary, the C code modulo operation "A % B" is realised by two assembler instructions - "sdiv" (signed division) followed by "mls" (multiply and subtract). Sdiv finds the integer result R of the division of A by...
    4 replies | 98 view(s)
  • TelephoneBill's Avatar
    08-13-2019, 04:44 PM
    Two excellent replies... thankyou both. The "Compiler Explorer" is a whizz tool. Not seen it before.
    4 replies | 98 view(s)
  • TelephoneBill's Avatar
    08-13-2019, 10:01 AM
    Does anyone know how the algorithm works for performing modulo division in the Arduino/Teensyduino IDE? I'm interested to know if the timing for this operation might depend on the size of the operands involved? If...
    4 replies | 98 view(s)
  • TelephoneBill's Avatar
    08-11-2019, 01:49 PM
    I forgot to add that in order to get the 81 KHz frequency exact with Scheme (3), I needed to change the value from 0x04 to 0x08 for one of the digital capacitors... //This following code will make incremental...
    4 replies | 239 view(s)
  • TelephoneBill's Avatar
    08-11-2019, 01:22 PM
    So the Scheme (3) with absolute timing is as follows, recalling that MODA is 6 nS early, and MODB is 10 nS late: MODA (-6nS), MODB (+4nS), MODA(-2nS), MODA(-8nS), MODB (+2nS), MODA (-4nS), MODA (-10nS), MODB (0nS). ...
    4 replies | 239 view(s)
  • TelephoneBill's Avatar
    08-11-2019, 12:53 PM
    Having found a solution which was an almost perfect 81 KHz frequency square waveform, I wondered if it was now possible to reduce the jitter without loss of frequency precision. The jitter is caused by the...
    4 replies | 239 view(s)
  • TelephoneBill's Avatar
    08-07-2019, 07:52 PM
    I had need recently to see if I could generate a very precise 81 KHz signal using a Teensy 3.5. I was looking for precision much better than 1 Hz. This frequency is employed by Radio Station GYN2, which...
    4 replies | 239 view(s)
  • TelephoneBill's Avatar
    08-07-2019, 06:32 PM
    Glad to help. Yes, it does mean that the board is OK to work with. You may wish to experiment with turning the LED on and off by writing your own code. You learn a great deal by such experiments. One of the very...
    3 replies | 75 view(s)
  • TelephoneBill's Avatar
    08-07-2019, 08:37 AM
    The schematic for Teensy 3.2 can be found here... https://www.pjrc.com/teensy/schematic.html As you can see on the right hand side of the diagram, there is nothing particularly special about the LED. It is a simple...
    3 replies | 75 view(s)
  • TelephoneBill's Avatar
    07-23-2019, 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...
    4150 replies | 425346 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. ...
    4150 replies | 425346 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"...
    4150 replies | 425346 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!
    4150 replies | 425346 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"...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 view(s)
  • TelephoneBill's Avatar
    07-16-2019, 09:34 AM
    Seems that Post #2 is the situation.
    11 replies | 310 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 | 242 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 | 310 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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...
    4150 replies | 425346 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.) ...
    4150 replies | 425346 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...
    4150 replies | 425346 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 | 1019 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 | 1019 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 | 1019 view(s)
No More Results
About TelephoneBill

Basic Information

About TelephoneBill
Location:
UK

Statistics


Total Posts
Total Posts
278
Posts Per Day
0.17
Last Post
T4: jitter-free low frequency output pulse? 08-20-2019 07:53 AM
General Information
Last Activity
08-20-2019 08:56 AM
Join Date
03-03-2015