複雑なLSIの仕様を満たさない動作はエラッタとしてメーカーから公開される。これには動作の不具合の説明と、それを回避するワークアラウンドが載っている。ワークアラウンドはたいてい機能制限や性能低下につながる。これらは改版によって対処され、生産されるLSIは改版後のものに順次切り換えられる。

最近遊んでるPIC32MXのエラッタを調べてみた。CPU周りだけ。

20120404現在

□PIC32MX1XX/2XX PIC32MX575/675/695/775/795 共通
・CPUが書き込み操作時に割り込みが発生すると、書き込み操作が中断されて、割り込み処理完了後に再開される。この時に書き込み操作が中断されず、二重書き込みになることがある。
対策:大抵の場合二重書き込みは悪い影響はないが、SPI,I2C,UART,PMPの通信ではデータを二重に送ることがある。これを回避するにはDMA転送を使うか、これらの周辺にデータを書くときには割り込みを禁止する。

□PIC32MX575/675/695/775/795
・プリフェッチ機能と命令キャッシュを有効にしている状態で、CPUがフラッシュメモリのデータをアクセスしている(命令フェッチではない)時に割り込みが発生するとデータバス例外が起きることがある。
対策:以下2つの方法がある。
1.CPUがフラッシュメモリのデータにアクセスする間は割り込みを使わないようなプログラムにする。
2.プリフェッチか命令キャッシュのどちらかを無効にする。
※2.は10%未満の性能インパクト

 現在秋月電子で入手できる28pinDIPのPIC32MX1XX/2XXは最大40MHz動作、PC32MX575/675/695/775/795は最大80MHz動作。どちらも割り込みが関係している。MIPS M4Kの問題だろうか?

microchip.com | errata

PIC32MX1XX/2XX Family Silicon Errata and Data Sheet Clarification A0 A1まで

10. Module: CPU

 During normal operation, if a CPU write operation is interrupted by an incoming interrupt, it should be aborted (not completed) and resumed after the interrupt is serviced. However, some of these write operations may not be aborted, resulting in a double write to peripherals by the CPU (the first write during the interrupt and the second write after the interrupt is serviced).

Work around

 Most peripherals are not affected by this issue, as a double write will not have a negative impact.
However, the following communication peripherals will double-send data if their respective transmit buffers are written twice: SPI, I2C, UART and PMP.

 To avoid double transmission of data, utilize DMA to transfer data to these peripherals or disable interrupts while writing to these peripherals.

PIC32MX575/675/695/775/795 Family Silicon Errata and Data Sheet Clarification A0 A1 A3まで

Work around

 To avoid a DBE, use one of the following two solutions:

1. Structure application code, such that interrupts are not used while the CPU is accessing data from Flash memory.
2. Disable either the Prefetch module or CPU cache functionality as follows (by default both are disabled  on a Power-on Reset (POR)):
a) To disable the Prefetch module, set the Predictive Prefetch Enable bits, PREFEN<1:0>, in  the Cache Control Register, CHECON<6:5>, to‘00’.
b) To disable CPU cache, set the Kseg0 bits, K0<2:0>, in the CP0 Configuration Register, Config<2:0>, to ‘010’.

Note: Disabling either the cache or Prefetch module will have minimum performance degradation, with a typical application realizing 10 percent or less performance impact.


44. Module: CPU ※PIC32MX1XX/2XX 10. Module: CPUと同じ


追記:New pic32mx7 errata