Take an example of AT91SAM7S64 integrated chip,
1. Architecture: CPU [ARM, AVR, PowerPC, etc]
2. Connect Bus: ISA, AHP, USB, CAN, IIC, SPI, etc.
3. Basic Device: Clock [PMC], Trigger [AIC], Reset [RSTC], WatchDog [WDT], Memory [MC], Timer [TC]
4. Extension Device: Digital and Analog [A/D, D/A], I/O [PIA], Series [UART], etc
Every almost hardware of embedded chip like this. Whereas the experience to develop Drivers for Embedded System can conclusion in one sentence, according datasheet and modify the variable of register.
I separate Register into three categories,
1. Mode, for compatible application.
2. Process, for clearly the action of device.
3. Trigger, for trigger between CPU and device.
Those three aspects is the most important for developing a device driver. Even it is looks like very easy, but for modifying the register one bit, you should read many datasheet and know many about the architecture of CPU, such as the hazard vector, it usually located in the front of memory address.
Clearly know Memory Address is the key of success,
In memory address, sometimes, it will divide into several types, commonly, it is hazard vector, device register, and store memory. The probe in C/C++ can point at all of the memory address. There is way we using probe as a register pointer. But, remember that if you system setup a operating system, you can not modify register value directly in application layer.
本文以AT91SAM7S64芯片为例,介绍了嵌入式系统的架构、总线连接、基本设备及扩展设备等内容。重点阐述了驱动开发过程中依据数据手册修改寄存器变量的方法,并详细解释了寄存器的三个主要类别:模式、过程和触发。

4829

被折叠的 条评论
为什么被折叠?



