I am trying to migrate LCD code from MCF52259 to Kinetis platform.I used
Kinetis sample flexbus code for K60 but it did not work.
We are using UC1611s LCD driver, 8 data pins, fb_ad16 for
command/data,output enable, rw and chip select(cs0) as I guess.
I attached Flexbus init routine for MCF52259 in MCF52259flexbusinit.txt,
for k60 in k60flexbusinit.txt.
I defined MRAM_START_ADDRESS according to k60 reference manual as below:
#define MRAM_START_ADDRESS ((volatile unsigned char)(0x60000000))
In MCF52259, DMA initialization is done as follows:
void initDMA()
{
MCF_SCM_RAMBAR |= MCF_SCM_RAMBAR_BDE;
MCF_SRAM_RAMBAR |= (0x0001 << 9);
MCF_DMA0_DCR = MCF_DMA_DCR_SINC |
MCF_DMA_DCR_SSIZE(MCF_DMA_DCR_SSIZE_BYTE) |
MCF_DMA_DCR_DSIZE(MCF_DMA_DCR_DSIZE_BYTE);
MCF_DMA0_SAR = (uint32)&displayBuffer;
MCF_DMA0_DAR = 0x80010000;
MCF_DMA0_BCR = MCF_DMA_BCR_BCR(240);
sPutUART((uint8*)"ECHO DMA ok \r\n");
}
I could not find how to enable backdoor (BDE) in k60, it allows DMA to
reach SRAM and I don't know if it can be related to flexbus problem.I tried
to write and read data via flexbus but I read same values from adress that
means I can not write anything?!
--
İlke Akgöl
<http://cloud.entes.com.tr/%5C%5Cwww.entes.com.tr%5C>
Original Attachment has been moved to: MCF52259flexbusinit.txt.zip
Original Attachment has been moved to: k60flexbusinit.txt.zip