How to start learning ARM?

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello everyonecool,

I am a undergraduate student and I wanted some guidance on how should I start learning ARM. I have prior experience of working with 8051 and AVR. But learning ARM I don't know were and how should I start.

Please HELP.

 

This topic has a solution.
Last Edited: Mon. Jan 30, 2017 - 02:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Grab yourself a xplained pro board. I would start with the SAMD21 xplained pro. Using Atmel Studio and the ASF examples, you will be able to start learning quickly.

 

 

"When all else fails, read the directions"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But learning ARM I don't know were and how should I start.

Assembly programming:  google for "arm assembly programming" - understand the "ARM, Thumb and Thumb2" instruction sets.

 

Most ARM programming here seems to be done in "C".  Atmel Studio 7 doesn't support assembly for their ARM MCUs.

 

To control peripherals:  Select an Xplained board and read the datasheet for the MCU. Note that the Xplained Boards come with a built in debugger.

 

Read through the Forums in the ARM community.

 

You can buy the boards from mouser.com

 

I like the SAME70 Xplained board.  But it is a little more expensive than the SAMD21.

 

 

Last Edited: Sun. Jan 22, 2017 - 01:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks jstampfl and PhillyNJ

Can you refer me some books that I can use for focused learning.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what is your focus?

 

Take a look at "arm.com"  has training and tutorials etc.

Last Edited: Sun. Jan 22, 2017 - 05:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have the book "The Definitive Guide to the Arm Cortex-M3 2nd ed.

 

Here is a reference for the M&

 

http://infocenter.arm.com/help/t...

 

Otherwise, try google

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

jstampfl wrote:
Assembly programming: google for "arm assembly programming" - understand the "ARM, Thumb and Thumb2" instruction sets.

I would start with C, not Assembly, unless you're a masochist smiley.

"When all else fails, read the directions"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rockingSharma wrote:
I am a undergraduate student

Don't forget that your primary focus should be your course materials, so be sure to make that your first priority.

It would be worth discussing any "extra-curricular" study with your tutor/supervisor ...

jstampfl wrote:
"The Definitive Guide to the Arm Cortex-M3"

Yes, you should absolutely get the appropriate Definitive Guide - by Joseph Yiu; eg,

The Definitive Guide to ARM® Cortex®-M3 and Cortex®-M4 Processors - 3rd Edition - ISBN: 9780124080829, 9780124079182

https://www.elsevier.com/books/t...

PhillyNJ wrote:
I would start with C, not Assembly

Absolutely - no question!

As we're on the Atmel forum, an XPlained-Pro board and Atmel Studio are the obvious answer; D21 is a good starting point.

E70 is likely to be over complicated for a beginner.

Don't forget the horse's mouth:

http://www.infocentre.arm.com

Also good learning stuff from Keil (an ARM company):

http://www2.keil.com/mdk5/learn

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't favor the SamD21 because of ASF.  Still uses the GPIO system.  And I had to do a lot of debugging of ASF if I wanted to try something different.  It seemed to me that the SamD21 was a lot more difficult than the E70.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jstampfl wrote:
I don't favor the SamD21 because of ASF. Still uses the GPIO system

IMO ASF is pretty easy for doing i2c & SPI. For all my GPIO, I access the registers directly. ASF is a tool. They are there to help but you dont have to use them, you can use others like Assembly.

"When all else fails, read the directions"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

here is the syllabus:

1 Introduction: Need of advance microprocessors, Difference between RISC and CISC, RISC Design philosophy, ARM Design Philosophy, History of ARM microprocessor, ARM processor family, Development of ARM architecture

2 The ARM Architecture and Programmers Model : The Acorn RISC Machine, ARM Core data flow model, Architectural inheritance, The ARM7TDMI programmer’s model: General purpose registers, CPSR, SPSR, ARM memory map, data format, load and store architecture, Core extensions, Architecture revisions, ARM development tools

3 ARM Instruction set: Data processing instructions, Arithmetic and logical instructions, Rotate and barrel shifter, Branch instructions, Load and store instructions, Software interrupt instructions, Program status register instructions, Conditional execution, Multiple register load and store instructions, Stack instructions, Thumb instruction set, advantage of thumb instructions, Assembler rules and directives, Assembly language programs for shifting of data, factorial calculation, swapping register contents, moving values between integer and floating point registers

4 C Programming for ARM: Overview of C compiler and optimization, Basic C data types, C Looping structures, Register allocations, function calls, pointer aliasing, structure arrangement, bit-fields, unaligned data and Endianness, Division, floating point, Inline functions and inline assembly, Portability issues. C programs for General purpose I/O, general purpose timer, PWM Modulator, UART, I2C Interface, SPI Interface, ADC, DAC

5 Memory management units: Moving from memory protection unit (MPU) to memory management unit (MMU), Working of virtual memory, Multitasking, Memory organization in virtual memory system, Page tables, Translation look aside buffer, Caches and write buffer, Fast context switch extension

6 Advanced Microprocessor Bus Architecture (AMBA) Bus System, User peripherals, Exception handling in ARM, ARM optimization techniques

 

And here are the questions regarding each unit (please don't mind my dumb questions):

1. No questions for it

2. Does each ARM like AVR doesn't have different data flow model, architectural inheritance, programmer’s model and ARM development tools?

3. and 4. If ARM variants have different sort of register sets than its assembly would vary, is it so?

5. and 6. Same questions for these chapters too, does ARM variants require specific understanding of Memory management units for every other variant?

and they haven't even specified which ARM(any board or IC) we are supposed to deal with, so in this case what I need to do?

As there are lot of ARM family, from which I should start with?

Last Edited: Tue. Jan 31, 2017 - 04:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You've been directed to Arm.com where your questions on architecture will be answered. The modern offerings are the M and the A series. M is for microcontroller and A is for application. You would normally run something like Linux on an A series arm and these have memory management units.
So I'd suggest for controlling bits and bobs you'd use a M series core. Currently there's M0,3,4 and 7 in ascending order of performance. Atmel have offerings for all including the A series.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

here is the syllabus

OK; that sounds like a very "computer architecture" oriented class, rather than a "make the microcontroller work" class.

 

The ARM7TDMI programmer’s model

Is pretty much obsolete, replaced by the ARM Cortex architecture.   They're similar and have similar roots, but also significantly different.  One of the differences is a more significant split between "microcontroller" (Cortex-M) and "Applications" (Cortex-A) architectures.  (ARM7TDMI is version 4 of the ARM Architecture. Your recent phone probably has a version-8 architecture chip, and an Atmel SAMD chip has a v6m architecture.  (ARM has a confusing scattering of numbers throughout "architecture", "core name", and ... etc.  Grr.))

 

2. Does each ARM like AVR doesn't have different data flow model, architectural inheritance, programmer’s model and ARM development tools?

An ARM chip divides into the "ARM Core" which is the CPU and some closely-associated hardware, and a bunch of vendor-provided peripherals and such that you only need to learn about if you actually want to make a chip DO things.   The "programmer's models" for the CPU are "similar" even across multiple versions, as are tools and data flow within the CPU, but other things differ (one example: the Core includes some ARM-defined buses.  But which buses have which peripherals is up to the vendor.  Another: in ARM7TDMI, the core defined a very simple interrupt structure, and vendors would often add a more complex interrupt controller outside of the core.   But in ARM-Cortex-M, ARM decided to make a fancier interrupt controller part of the core.

 

3. and 4. If ARM variants have different sort of register sets than its assembly would vary, is it so?

Register sets are very similar.  Assembly syntax is very similar, with the (source-code) instructions that are present on a Cortex-M0 being a proper subset of the instructions present on a fancier ARM chip.   (Figuring out exactly what is in the subset can be annoyingly complicated, however.)

 

5. and 6. Same questions for these chapters too, does ARM variants require specific understanding of Memory management units for every other variant?

I've never used (programmed) an ARM with an MMU.  The "Application" processors tend to have MMUs, while the Microcontroller ARMs only have a memory protection unit.  Which I also haven't used.

 

Trying to learn "The ARM Architecture" can be very frustrating.  ARM documentation is scattered across multiple 1000-page documents, and they'll be like "This core implements this architecture (see the other manual) except that it has the following limitations described in (see another manual.)  For the instruction set description see this 4th manual."  Bleh.    IMO, you're much better off picking a particular chip and becoming familar with its operation, and THEN looking at the ARM documents to figure out how that particular subset fits into the whole family.   Vendor data sheets are uneven; The Atmel SAM3 datasheets included a lot of stuff (160 pages worth of "The ARM CM3 processor" that is left out of the Atmel SAMD datasheets (15 pages and "See arm.com"))  TI has pretty complete datasheets.

A good start would be the "CPU" or "Processor" section from one of the better data sheets (Atmel CM3, TI TMC4F...)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I started programming SAMD21 a little while ago and found that ASF gets in one's way - it's so complicated to use. It depends what you want to do: learn ARM architecture, or produce programs. If you want to produce programs create a non-ASF C/C++ project and just use the .h files for the components + read the data sheet. You can also study the ASF examples. If you want to learn the architecture read the ARM manuals, but DON'T write assembler - it's painful enough for the 8-bit processors, and the compiler does a good job in optimising the code for speed as well as size.

The Sparkfun SAMD21 Dev breakout board has much the same features as the SAMD21 xplained board, but you need an Atmel-ICE for programming/debugging

Jerry

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jerryr wrote:

but you need an Atmel-ICE for programming/debugging

I was looking for this information before buying Sparkfun SAMD21 Dev breakout. Thank you so much.

Last Edited: Mon. Jan 30, 2017 - 02:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jerryr wrote:
The Sparkfun SAMD21 Dev breakout board has much the same features as the SAMD21 xplained board, but you need an Atmel-ICE for programming/debugging

So why not just get the XPro board?

Also, Atmel Studio will automatically recognise the XPro board and present you with the list of ready-made examples specifically designed for that board.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Prof Valvano at Utexas is re-doing his embedded systems MOOC.   I took the first iteration of this, and found it to be:

1) Pretty good.

2) Not a bad intro to an ARM microcontroller (TI TM4C Cortex M4F)

It doesn't go very deeply into the ARM architecture, and someone who is already familiar with embedded programming may find a lot of it to be "review", but I found it pretty helpful.  It's since been split up into two parts, and I don't know whether it covers exactly the same  things, but it's worth a try, IMO.  The profs involved are enthusiastic and aggressive in their support of online learning, they've done interesting things that permit "labs", and I can't imagine that the class has done anything other than get better since the initial version.  (Ignore the bad acting... (sigh.))

https://www.edx.org/course/embed...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
It doesn't go very deeply into the ARM architecture,

To be honest, it is very rarely necessary to go deeply into the ARM (or any other) CPU architecture.

For the vast majority of embedded microcontroller work, the CPU architecture is largely irrelevant - it's dealing with the peripherals that is the Big Thing.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...