MK60DN512VMD10 flexbus problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MK60DN512VMD10 flexbus problem

513 Views
ilkea
Contributor I

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

0 Kudos
1 Reply

282 Views
perlam_i_au
Senior Contributor I

Because MCF52259 and Kinetis K60 are pretty different I suggest you to avoid porting an use solutions designed specifically for Kinetis, you will optimize functionality of your device working on the specific solutions for it.

You can download the application note AN4346 Designing a Working Prototype using MQX™ RTOS and Tower System for Kinetis Microcontrollers in this link and you can also download software related to this application note here.

0 Kudos