Arm registers

sci.electronics.design Arm Cortex assembley code

Does the Arm Cortex support both the "thumb" 16 bit machine codes and also the 32 bit codes? I had been under the impression that Cortex devices only provided the thumb codes but a little time going through "Arm v7-M Architecture Reference Manual" indicates otherwise. Whether or not that reference manual is suitable for Cortex information needs verification also. There may be a more pertinent text available. And another question: the thumb instructions show 8 available registers rather than 16. However, somewhere on the internet a site states that 16 registers are available & which group of 8 varies with the "processor state". Any suggestions on an Arm manual or text that defines "processor state"? The CPS (change processor state) machine code description in the "Arm v7-M Architecture Reference Manual" doesn't mention register groups.

Hul

Reply to
Hul Tytus
Loading thread data ...

The Cortexes support the Thumb2 instruction set with 16 registers. In Cortex-M's, there is no 32 bit ARM mode accessible via a bx instruction.

If you think along the ARM7TDMI way, please get a document of the Thumb2 instruction set. The processor starts up in a different way from the older ARM/Thumb processors, directly into Thumb2 mode.

Interrupt handlers are also in Thumb mode and quite different from the older ARMs.

There are no shadow register sets in the ARM7TDMI way. The only shadowed register is the stack pointer, which can be different in process (user) and exception (system) modes. However, the main stack pointer (system) can be used all the time.

The Thumb2 instruction set has the instructions needed to access the top 8 registers and also instructions for system control, which had to use the 32 bit mode in an ARM7TDMI.

Reply to
Tauno Voipio

Tauno - The Cortex group of processors showed, according to reports mostly in this newsgroup, a faster & more consistent response to interupts than previous Arm's. Hence my leaning toward the Cortex devices. I'm probably looking for a reference manual describing the thumb2 instruction set which you mentioned. Do you know the title of an appropriate manual from Arm? Or perhaps where such a document is found. The "Arm v7-M Architecture Reference Manual" doesn't fit.

Hul

Tauno Voipio snipped-for-privacy@notused.fi.> > sci.electronics.design

Reply to
Hul Tytus

Here:

Please note that ARM have a confusing version system on their chips: an ARM7TDMI is ARM v4, and the Cortexes are ARM v7.

ARM v7-M Architecture Application Level Reference Manual,

534 pages, ARM DDI 0405A-01,

Cortex-M3 Technical Reference Manual, 410 pages, ARM DDI 0337G

The manuals should be downloadable on the ARM website, and many of the final chip makers have copies on their websites. My copies are somewhat old, the versions and document numbers may differ in current versions.

There are others, but the above should be a good one for starters. It is for the M variant which is just fine for small embedded systems. In my new constructions there are Cortex-M3 and Cortex-M4 chips.

In my experience, the basic Cortex is pretty easy to make work, even for multi-threading, but the peripherals around it on the processor chip may be intimidating. The per-chip manuals are about as intimidating as the ones above.

I have been using TI/Stellaris LM3S series, the Atmel SAM and ST ST32 series.

Reply to
Tauno Voipio

Thanks Tauno. I think what is needed at this point is a listing of the machine codes the various Cortex processors support. Do any of the you mention have that information?

Hul

Tauno Voipio snipped-for-privacy@notused.fi.> Here:

Reply to
Hul Tytus

This gives a good graphical overview:

formatting link
And it is also here:
formatting link
Arie

Reply to
Arie de Muynck

Arie thanks. That may be handy.

Hul

Arie de Muynck snipped-for-privacy@ademu.com wrote:

Reply to
Hul Tytus

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.