Best Practices

July 31, 2007

More on Buffer Zones

In last month’s newsletter I talked about analyzing the size of buffers. Now I will discuss the importance of proper management support for buffers – support in terms of status, interrupts, and errors. For example, when should an interrupt be generated on the receiving buffer? When one byte arrives? When […]
August 31, 2007

Identifying Chips and Blocks

The constant drive to announce improved products with new features can force frequent changes in both hardware and firmware. New chips and firmware may be produced that are mostly the same as their predecessors but with a few new features or tweaks. Ideally, any version of firmware will work with […]
September 29, 2007

The Impacts of Debugging Facilities and Platform-Specific Code

I just returned from the Embedded Systems Conference (ESC) in Boston where I taught a course on lessons learned from hardware/firmware interface design. These conferences are always good for interacting with other engineers and learning from them. Two things I learned at ESC apply directly to this month’s topic on […]
October 31, 2007

Managing Platform-Specific Code

Porting firmware code to a new hardware platform often requires making changes that break support for old platforms. Code maintenance, defect fixes, and new features become cumbersome and error prone when such changes must be made across multiple versions of the same code. In last month’s issue, I talked about […]
November 30, 2007

Using DMA Controllers to Troubleshoot Problems

Many blocks within chips process data read from or written to memory using direct memory access (DMA) controllers. Firmware initiates the data processing by setting up the blocks and DMA controllers. When problems occur, the first task is to figure out if the problem is in the block, in the […]
December 31, 2007

More Troubleshooting Support in DMA Controllers

In last month’s issue I discussed how DMA controllers can be used to troubleshoot data flow problems in and out of a block. Since DMA controllers are instantiated in many blocks, the DMA controller is a good place to put additional debugging tools. One such debugging tool is a CRC […]
January 31, 2008

Intangible Benefits

A client recently asked me to write down some suggestions of best practices and process improvements for his company. I noted several suggestions, sorted them into four categories, and started writing them up. Partway through this process, I noticed that two of my recommendations seemed to contradict each other. On […]
February 28, 2008

Documenting Registers

Much of firmware development focuses on interfacing with registers. Documentation plays a key role in this effort since engineers must refer to it constantly to look up register and bit details. In particular, engineers need to generate or decode hex numbers, where the value of each bit must be clearly […]
March 31, 2008

More on Documenting Registers

Last month’s newsletter discussed some best practices for documenting register layouts, illustrating key points with a sample register diagram. One reader, Joel Saks, noted that my register diagram did not clearly indicate whether the bits were read/write bits or read-only bits. Joel makes an excellent point and also exposes one […]
May 31, 2008

Sniffing I2C

While adding an I2C communication bus to an embedded power supply for a client, I recently reviewed the datasheet for an I2C bus switch, a PCA9546A by NXP. This particular switch allows one or more downstream I2C buses to be switched into one upstream I2C bus. The PCA9546A switch is […]