AnsweredAssumed Answered

i.MX RT1062 SEMC DBI mode

Question asked by Antoine Zen-Ruffinen on Nov 6, 2019
Latest reply on Nov 12, 2019 by Antoine Zen-Ruffinen

Hi,

 

I try to use the SEMC in DBI mode in order to interface an TFT-LCD with 8bits 8080 type interface. Here is my SMEC initialization code:

 

/* Init SEMC perfieral */
semc_config_t semc_config;
SEMC_GetDefaultConfig(&semc_config);
semc_config.dqsMode = kSEMC_Loopbackinternal; /* For more accurate timing. */
SEMC_Init(SEMC, &semc_config);

/* Configure the SEMC module to inteface to the display, "DBI" mode */
status_t config_res;
semc_dbi_config_t dbi_config;
dbi_config.csxPinMux = kSEMC_MUXA8;
dbi_config.address = 0x80000000;
dbi_config.memsize_kbytes = 128;
dbi_config.columnAddrBitNum = kSEMC_Dbi_Colum_12bit;
dbi_config.burstLen = kSEMC_Dbi_BurstLen1;
dbi_config.portSize = kSEMC_PortSize8Bit;
dbi_config.tCsxSetup_Ns = 100;//50;
dbi_config.tCsxHold_Ns = 100;//50;
dbi_config.tWexLow_Ns = 100;//40;
dbi_config.tWexHigh_Ns = 100;//40;
dbi_config.tRdxLow_Ns = 100;//90;
dbi_config.tRdxHigh_Ns = 100;//70;
dbi_config.tCsxInterval_Ns = 100;//50;
config_res = SEMC_ConfigureDBI(SEMC, &dbi_config, CLOCK_GetFreq(kCLOCK_SemcClk));
if(config_res != kStatus_Success)
{
printf("Error: Failed to initialize SEMC DBI!\n");
}

 

Note that on this code, I've increased the timing temporary to improve debugging with logic analyser.

To write the data to the Display I then write to the address 0x80000000 for command and 0x80010000 for data by de-referencing a pointer on an unsigned char. This all seems to work, but when I try to send on byte, it appears that the SEMC sends out 8 bytes! See the logic analyser capture bellow where 0x30 is supposed to be sent:

 

Any Idea what could code those 8 bytes to be sent instead of 1 byte ?

Also, can you please help me to understand the "columnAddreBitNum"  and "busrtLen"  ?  Those totally make sens for other type of memory (SDRAM, Flash...) but not for a display.  I don't know why we have to give a memory size, as TFT with controller is only two address cells (one for commands, one for data, the address bit controlling the D/CX signal).

 

If some one has a code example using SEMC in DBI mode that would be greatly appreciated (there is none in the SDK).

 

Thanks!

 

Antoine

Outcomes