Roger Dubuc

Error in CodeWarrior Stationery for Coldfire 5485 (mcf548x_slt.h)

Discussion created by Roger Dubuc on Aug 30, 2006
Latest reply on Aug 31, 2006 by CrasyCat
The include file mcf548x_slt.h contains a numbering error that causes problems when using Slice Timer 1.
 
Specifically,  the following lines have an incorrect offset:
 
#define MCF_SLT_SLTCNT1      (*(vuint32*)(void*)(&__MBAR[0x000914]))
#define MCF_SLT_SCR1            (*(vuint32*)(void*)(&__MBAR[0x000918]))
#define MCF_SLT_SCNT1          (*(vuint32*)(void*)(&__MBAR[0x00091C]))
#define MCF_SLT_SSR1             (*(vuint32*)(void*)(&__MBAR[0x000920]))
 
The correct offset is:
 
#define MCF_SLT_SLTCNT1      (*(vuint32*)(void*)(&__MBAR[0x000910]))
#define MCF_SLT_SCR1            (*(vuint32*)(void*)(&__MBAR[0x000914]))
#define MCF_SLT_SCNT1          (*(vuint32*)(void*)(&__MBAR[0x000918]))
#define MCF_SLT_SSR1            (*(vuint32*)(void*)(&__MBAR[0x00091C]))

Outcomes