EmbeddedRelated.com
Forums
The 2026 Embedded Online Conference

Can you turn off Pipeline in ARM Cortex M3

Started by Klaus Kragelund September 8, 2015
On 10/09/15 18:45, rickman wrote:
> On 9/10/2015 4:53 AM, David Brown wrote: >> On 10/09/15 09:16, rickman wrote: >>> On 9/10/2015 3:05 AM, David Brown wrote: >>>> On 09/09/15 23:30, Tom Gardner wrote: >>>>> On 09/09/15 21:56, Dimiter_Popoff wrote: >>>>>> [uS is what I would >>>>>> have written, how am I supposed to do that now? "us" is more ambiguous? >>>>>> Tom?] >>>>> >>>>> :( >>>>> >>>>> Prepend a number :) >>>>> >>>>> More seriously I have seen a "micro" character in some usenet posts. >>>>> I wonder how it got there, and whether other people's clients rendered >>>>> it correctly. >>>>> >>>>> Let's try "μ" which is simply a "special character" inserted into >>>>> an OpenOffice document then copied/pasted into this message, which >>>>> I'm composing in SeaMonkey. Since it can also be copied/pasted >>>>> into a linux/bash command line in the xfce terminal emulator, there's >>>>> cause for hope. >>>>> >>>>> If it works I don't know whether I'll use it every time and become >>>>> a major nitpicker with those that don't! >>>> >>>> µs works fine for me. As long as readers have a reasonably modern >>>> newsreader, there should be no problem with the letter "mu" for micro - >>>> it is a standard character in the standard fonts on most systems. If >>>> someone has customised their desktop or newsreader to use a weird font >>>> with a more limited character range, then it might show up oddly. If >>>> there are any fans of command-line newsreaders, they should also see it >>>> if they have a utf-8 locale on their systems. >>>> >>>> As for typing it, that depends on your system and your keyboard. >>>> Windows is (as always) more limited. It should be easy for most >>>> non-English keyboard layouts, which separate the "Alt" and the "Alt Gr" >>>> keys - on my Norwegian keyboard layout, it's just AltGr-m. But if that >>>> doesn't work, character map is probably the least inconvenient method >>>> unless you can remember the Alt + numeric keyboard sequence. >>>> >>>> For Linux, you have other options. Again, depending on the keyboard >>>> layout, AltGr-m is likely to work - certainly on my Norwegian layout I >>>> can get a wide range of characters with combinations of AltGr, shift, >>>> and different keys. Then there is also the "compose" key - typically, >>>> this is not assigned by default, but you can set it up if you want it (I >>>> use the "scroll lock" key as compose). Then µ is compose + m + u. >>> >>> Along with the often used >>> >>> ° - Alt-0176 >> >> Shift-AltGr-0 or Compose+o+o gives me ° >> >>> ± - Alt-0177 >> >> AltGr-+ or Compose+++- gives me ± >> >> Both of these work in Linux, but not Windows. >> >>> >>> mu is >>> µ - Alt-0181 >>> >>> The zero is very important. Without it you get other chars. > > What is AltGr?
On most keyboards, the key to the right of the space bar (Alt is on the left) IBM standard for 30 years.
On 9/10/2015 2:05 PM, Tom Gardner wrote:
> On 10/09/15 18:45, rickman wrote: >> On 9/10/2015 4:53 AM, David Brown wrote: >>> On 10/09/15 09:16, rickman wrote: >>>> On 9/10/2015 3:05 AM, David Brown wrote: >>>>> On 09/09/15 23:30, Tom Gardner wrote: >>>>>> On 09/09/15 21:56, Dimiter_Popoff wrote: >>>>>>> [uS is what I would >>>>>>> have written, how am I supposed to do that now? "us" is more >>>>>>> ambiguous? >>>>>>> Tom?] >>>>>> >>>>>> :( >>>>>> >>>>>> Prepend a number :) >>>>>> >>>>>> More seriously I have seen a "micro" character in some usenet posts. >>>>>> I wonder how it got there, and whether other people's clients >>>>>> rendered >>>>>> it correctly. >>>>>> >>>>>> Let's try "μ" which is simply a "special character" inserted into >>>>>> an OpenOffice document then copied/pasted into this message, which >>>>>> I'm composing in SeaMonkey. Since it can also be copied/pasted >>>>>> into a linux/bash command line in the xfce terminal emulator, there's >>>>>> cause for hope. >>>>>> >>>>>> If it works I don't know whether I'll use it every time and become >>>>>> a major nitpicker with those that don't! >>>>> >>>>> µs works fine for me. As long as readers have a reasonably modern >>>>> newsreader, there should be no problem with the letter "mu" for >>>>> micro - >>>>> it is a standard character in the standard fonts on most systems. If >>>>> someone has customised their desktop or newsreader to use a weird font >>>>> with a more limited character range, then it might show up oddly. If >>>>> there are any fans of command-line newsreaders, they should also >>>>> see it >>>>> if they have a utf-8 locale on their systems. >>>>> >>>>> As for typing it, that depends on your system and your keyboard. >>>>> Windows is (as always) more limited. It should be easy for most >>>>> non-English keyboard layouts, which separate the "Alt" and the "Alt >>>>> Gr" >>>>> keys - on my Norwegian keyboard layout, it's just AltGr-m. But if >>>>> that >>>>> doesn't work, character map is probably the least inconvenient method >>>>> unless you can remember the Alt + numeric keyboard sequence. >>>>> >>>>> For Linux, you have other options. Again, depending on the keyboard >>>>> layout, AltGr-m is likely to work - certainly on my Norwegian layout I >>>>> can get a wide range of characters with combinations of AltGr, shift, >>>>> and different keys. Then there is also the "compose" key - typically, >>>>> this is not assigned by default, but you can set it up if you want >>>>> it (I >>>>> use the "scroll lock" key as compose). Then µ is compose + m + u. >>>> >>>> Along with the often used >>>> >>>> ° - Alt-0176 >>> >>> Shift-AltGr-0 or Compose+o+o gives me ° >>> >>>> ± - Alt-0177 >>> >>> AltGr-+ or Compose+++- gives me ± >>> >>> Both of these work in Linux, but not Windows. >>> >>>> >>>> mu is >>>> µ - Alt-0181 >>>> >>>> The zero is very important. Without it you get other chars. >> >> What is AltGr? > > On most keyboards, the key to the right of the space bar (Alt is on the > left) > IBM standard for 30 years.
The two keys were always labeled the same on all of my keyboards including a couple of IBM units. I never noticed a difference in function. I don't get anything when using AltGr on this keyboard. When I run through the alphabet with the AltGr key pressed, it does the various ALT key functions. Should I ask what "compose" is? -- Rick
On Thursday, September 10, 2015 at 9:45:01 AM UTC+2, John Devereux wrote:
> rickman <gnuarm@gmail.com> writes: > > > On 9/9/2015 9:24 AM, John Devereux wrote: > >> Dimiter_Popoff <dp@tgi-sci.com> writes: > >> > >>> On 09.9.2015 &#1075;. 12:18, Tom Gardner wrote: > >>>> On 08/09/15 21:51, Klaus Kragelund wrote: > >>>>> Disabling the pipeline would make the code more determistic > >>>> > >>>> Not significantly. > >>>> > >>>> Even with i486s, with their tiny caches, the ratio between > >>>> mean and worst case (IIRC) interrupt latencies could be 10:1 > >>>> (from memory 70us vs 700us). > >>> > >>> Hmmm, these are huge figures, even the 70uS is too huge I suppose. > >>> A 1 MHz 6800 had IRQ latency in the range of 30uS or so. > >> > >> We are talking about a CM3, that has sub-microsecond latency (12 cycles > >> from memory). > > > > Only if the interrupt is enabled. Depending on what the code is doing > > it can be a lot longer. That is the real concern in an ISR. > > Yes if he is relying on a guaranteed interrupt latency he should not > turn them off. Also should be top priority irq! > > He should not turn the clock down to 1 khz either. Or set his timer > output back to a GPIO. Etc. > > I don't think it is a good idea to have the deadtime enforced by > software, regardless. OP is going to get mighty tired of changing blown > FETS during development. I was just responding to the talk above about > caches and pipelines and 70us vs 700us latencies. None of that matters > on a CM3 if a guaranteed <1us jitter is acceptable. >
We have a kill function for the PWM outputs if a half-bridge is shorted. By you are right, it is a slippery slope Cheers Klaus
On 10/09/15 23:40, rickman wrote:
> On 9/10/2015 2:05 PM, Tom Gardner wrote: >> On 10/09/15 18:45, rickman wrote: >>> On 9/10/2015 4:53 AM, David Brown wrote: >>>> On 10/09/15 09:16, rickman wrote: >>>>> On 9/10/2015 3:05 AM, David Brown wrote: >>>>>> On 09/09/15 23:30, Tom Gardner wrote: >>>>>>> On 09/09/15 21:56, Dimiter_Popoff wrote: >>>>>>>> [uS is what I would >>>>>>>> have written, how am I supposed to do that now? "us" is more >>>>>>>> ambiguous? >>>>>>>> Tom?] >>>>>>> >>>>>>> :( >>>>>>> >>>>>>> Prepend a number :) >>>>>>> >>>>>>> More seriously I have seen a "micro" character in some usenet posts. >>>>>>> I wonder how it got there, and whether other people's clients >>>>>>> rendered >>>>>>> it correctly. >>>>>>> >>>>>>> Let's try "&mu;" which is simply a "special character" inserted into >>>>>>> an OpenOffice document then copied/pasted into this message, which >>>>>>> I'm composing in SeaMonkey. Since it can also be copied/pasted >>>>>>> into a linux/bash command line in the xfce terminal emulator, >>>>>>> there's >>>>>>> cause for hope. >>>>>>> >>>>>>> If it works I don't know whether I'll use it every time and become >>>>>>> a major nitpicker with those that don't! >>>>>> >>>>>> &micro;s works fine for me. As long as readers have a reasonably modern >>>>>> newsreader, there should be no problem with the letter "mu" for >>>>>> micro - >>>>>> it is a standard character in the standard fonts on most systems. If >>>>>> someone has customised their desktop or newsreader to use a weird >>>>>> font >>>>>> with a more limited character range, then it might show up oddly. If >>>>>> there are any fans of command-line newsreaders, they should also >>>>>> see it >>>>>> if they have a utf-8 locale on their systems. >>>>>> >>>>>> As for typing it, that depends on your system and your keyboard. >>>>>> Windows is (as always) more limited. It should be easy for most >>>>>> non-English keyboard layouts, which separate the "Alt" and the "Alt >>>>>> Gr" >>>>>> keys - on my Norwegian keyboard layout, it's just AltGr-m. But if >>>>>> that >>>>>> doesn't work, character map is probably the least inconvenient method >>>>>> unless you can remember the Alt + numeric keyboard sequence. >>>>>> >>>>>> For Linux, you have other options. Again, depending on the keyboard >>>>>> layout, AltGr-m is likely to work - certainly on my Norwegian >>>>>> layout I >>>>>> can get a wide range of characters with combinations of AltGr, shift, >>>>>> and different keys. Then there is also the "compose" key - >>>>>> typically, >>>>>> this is not assigned by default, but you can set it up if you want >>>>>> it (I >>>>>> use the "scroll lock" key as compose). Then &micro; is compose + m + u. >>>>> >>>>> Along with the often used >>>>> >>>>> &deg; - Alt-0176 >>>> >>>> Shift-AltGr-0 or Compose+o+o gives me &deg; >>>> >>>>> &plusmn; - Alt-0177 >>>> >>>> AltGr-+ or Compose+++- gives me &plusmn; >>>> >>>> Both of these work in Linux, but not Windows. >>>> >>>>> >>>>> mu is >>>>> &micro; - Alt-0181 >>>>> >>>>> The zero is very important. Without it you get other chars. >>> >>> What is AltGr? >> >> On most keyboards, the key to the right of the space bar (Alt is on the >> left) >> IBM standard for 30 years. > > The two keys were always labeled the same on all of my keyboards > including a couple of IBM units. I never noticed a difference in > function. I don't get anything when using AltGr on this keyboard. When > I run through the alphabet with the AltGr key pressed, it does the > various ALT key functions.
Maybe the AltGr key is only common on non-US keyboards. Certainly the US keyboard layout has far fewer characters and combinations than international keyboard layouts, with the UK layout only marginally better. (This applies to Windows and Linux layouts, AFAIK.)
> > Should I ask what "compose" is? >
It is a key common in *nix systems, at least under X. Unix workstation keyboards would have a dedicated "compose" key, but most people use PC keyboards these days and you have to configure a compose key if you want it (I always use the Scroll Lock key, but there are many options). When you press "compose" and then another two keys, you get a character according to a layout table. The choice of characters in this table are made to be somewhat logical - thus compose+m+u will give you &micro;, compose+A+E will give you &AElig;, compose+1+4 will give you &frac14;. It is far more intuitive than trying to remember codes for the numerical keypad.
On Thu, 10 Sep 2015 17:40:13 -0400, rickman <gnuarm@gmail.com> wrote:

>On 9/10/2015 2:05 PM, Tom Gardner wrote: >> On 10/09/15 18:45, rickman wrote: > >>> What is AltGr? >> >> On most keyboards, the key to the right of the space bar (Alt is on the >> left) >> IBM standard for 30 years. > >The two keys were always labeled the same on all of my keyboards >including a couple of IBM units. I never noticed a difference in >function. I don't get anything when using AltGr on this keyboard. When >I run through the alphabet with the AltGr key pressed, it does the >various ALT key functions.
The two ALT keys [and CTRL keys also] aren't labeled differently, but they have different scan codes and can be differentiated by software. Even prior to Unicode [going back to DOS 2.0 and maybe farther], PCs supported multiple display character sets. The convention for entering an alternate character was to hold the right hand ALT key while typing the character's code on the numeric keypad. Some compatibles allowed to use either ALT key, but IBM PCs did not and so the right hand ALT key was "special". However, I admit that I also have never seen/heard it called "AltGr". George
On Thu, 10 Sep 2015 23:17:28 -0400, George Neuner
<gneuner2@comcast.net> wrote:

>Some compatibles allowed to use either ALT key, but IBM PCs did not >and so the right hand ALT key was "special".
Just to be clear - this was an issue of PC-DOS vs MS-DOS. IBM only used the right ALT key, compatibles did whatever they wanted. Any program could hook into the keyboard read/filter chain to see the actual key presses ... the limitation of only using the right hand ALT key to enter alternate characters was just the default behavior under PC-DOS. George
On 9/10/2015 8:10 AM, John Devereux wrote:
> Tom Gardner <spamjunk@blueyonder.co.uk> writes: > >> On 10/09/15 08:51, John Devereux wrote: >>> Tom Gardner <spamjunk@blueyonder.co.uk> writes: >>>> One of my projects, when I get A Round Tuit, is to make a 2GS/s >>>> 4GHz scope. The trick is to find a way to do it with only trivial >>>> analogue front end components. Hence no amplifiers, no ADCs, just >>>> a 50ohm input with very simple analogue components. Yes, there >>>> will be limitations, but that's half the fun :) >>> >>> Hmm, there was the "slideback sampler" that John Larkin and Mike Monet >>> used to fight about, a decade or two ago in sci.electronics.design. >> >> As far as I can tell from mostly dead links, similar >> but not quite the same. > > Hey I archived one of them > > <http://ee.devereux.me.uk/20150910130650.pdf>
I took a look and I must be missing something. The initial circuit claims "The output of the op amp is the waveform of the HF signal converted to a much lower frequency." But it clearly isn't. In the following simulation graphs, the output of the waveform is similar to the input signal only limited to the slew rate and ripple added. He talks about increasing the bandwidth from 1.5 GHz for a MAX104 to 7 GHz for this circuit. I'm not at all clear how this circuit would be used. Is the FF output used as a pulse density representation of the input signal? Otherwise how is it an ADC at all? -- Rick
On 9/10/2015 11:31 PM, George Neuner wrote:
> On Thu, 10 Sep 2015 23:17:28 -0400, George Neuner > <gneuner2@comcast.net> wrote: > >> Some compatibles allowed to use either ALT key, but IBM PCs did not >> and so the right hand ALT key was "special". > > Just to be clear - this was an issue of PC-DOS vs MS-DOS. IBM only > used the right ALT key, compatibles did whatever they wanted. > > Any program could hook into the keyboard read/filter chain to see the > actual key presses ... the limitation of only using the right hand ALT > key to enter alternate characters was just the default behavior under > PC-DOS.
I don't see any difference in behavior between the two ALT keys. Both work fine with the key codes I provided and neither work as the AltGr key is described. It is much handier to use the left ALT key while entering digits with the right hand. -- Rick
On Fri, 11 Sep 2015 00:04:18 -0400, rickman <gnuarm@gmail.com> wrote:

>I don't see any difference in behavior between the two ALT keys.
There is no difference unless software defines it. Each key on the keyboard has a unique "scan" code, which differs from the "character" code. [This is how keyboard remappers work.] Using the scan codes, left and right ALT and CTRL keys can be distinguished, but the default keyboard handler simply returns the same character code for both keys. You need to do a raw read of the keyboard device to see the different scan codes. Most software works just with character codes and doesn't need to know which keys actually were pressed.
>Both work fine with the key codes I provided and neither work as the >AltGr key is described.
https://en.wikipedia.org/wiki/AltGr_key The "AltGr" key on non-US keyboards has the same scan code as the right ALT key on US keyboards, so it is the software that makes it operate differently. George
On 9/11/2015 3:37 AM, George Neuner wrote:
> On Fri, 11 Sep 2015 00:04:18 -0400, rickman <gnuarm@gmail.com> wrote: > >> I don't see any difference in behavior between the two ALT keys. > > There is no difference unless software defines it.
What software is doing this? Are the BIOS in PCs sold outside the US different? I thought it was windows that set the char set. I had no idea it would also give the ALT keys different functions.
> Each key on the keyboard has a unique "scan" code, which differs from > the "character" code. [This is how keyboard remappers work.] > Using the scan codes, left and right ALT and CTRL keys can be > distinguished, but the default keyboard handler simply returns the > same character code for both keys. You need to do a raw read of the > keyboard device to see the different scan codes. > > Most software works just with character codes and doesn't need to know > which keys actually were pressed. > > >> Both work fine with the key codes I provided and neither work as the >> AltGr key is described. > > https://en.wikipedia.org/wiki/AltGr_key > > The "AltGr" key on non-US keyboards has the same scan code as the > right ALT key on US keyboards, so it is the software that makes it > operate differently. > > George >
-- Rick
The 2026 Embedded Online Conference