jiqing qiang

Strange thing about the QSPI module in MCF5235

Discussion created by jiqing qiang on Oct 3, 2006
Latest reply on Oct 13, 2006 by jiqing qiang
Hi all,

I'm trying to connect a spi-eeprom with the qspi module to the MCF5235. I wrote some code with the read/write functions which doesn't work correctly. When I did the step by step with BDM, I found a strange thing, that is the QAR is incremented by 2 at each write to QDR, that means:

MCF_QSPI_QAR = 0x20; // set QAR to command RAM zone
MCF_QSPI_QDR = 0xC200;

when I've passed the second line, QAR becomes 0x0022, so that I've got only 8 commands available instead of 16.

Is that because of the definition:
#define MCF_QSPI_QAR (*(vuint16*)(void*)(&__IPSBAR[0x000350])) ?

How can I fix this problem?

It's perhaps a stupid question but I wish someone could answer me, thanks a lot.

--
Ivy

Outcomes