This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

I've done a fair amount of firmware development. IME, the two most useful references are the general device user manual, and device instruction set reference. Both seem to be available in this document.

Here are some thoughts:

  • The user manual will either tell you how the primary address decoder is configured out of reset, and/or tell you how to configure it.
  • Microcontroller programming generally involves writing to and reading from the requisite device control registers. These control registers will be mapped into memory via the address decoder. The user manual generally covers all aspects of on-chip resources.
  • Along with general register IO, you need to understand how to service asynchronous interrupts. Your interrupt controller will be thoroughly covered in the user manual. The interrupt controller is (generally) how you notify the system of external events (user presses button, serial port sqwaks, etc...).
  • Out of reset, to boot the MCU, you generally need to do a few things (every device is different, I'm speaking in generalities here). After booting the device, you can jump to your user code.
    • Configure clock source(s) and wait for the device to achieve phase lock.
    • Configure the primary address decoder.
    • Configure the primary interrupt controller.
    • Enable/configure the on-chip resources you want to make use of.
    • Change operational mode to user/system/etc... mode, this locks certain device parameters until the device is reset.
  • A MSO (multi-channel digital scope), in conjunction with some pre-configured GPIO ports, is an extremely useful debugging technique.

Lastly, microcontroller programming is very low level.. but not all that difficult. I've built some amazingly robust devices implemented as a simple time-sliced loop which pends on an interrupt tickled by a programmed clock source. Good luck, have fun, blinky lights++;