This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM48L952: EMIF

Part Number: RM48L952

Hello,

I am trying to write 8 bit data to external asynchronous device using EMIF. I have enabled the EMIF driver, enabled the pinmux for EMIF, set my vclk3 to 8 Mhz and on EMIF tab enabled the EMIF ASYNC1 and rest setting are same as I want to use it in Normal mode.

What I have understood is I have to write data to the chip select memory address. I am using CS[4] address 0x68000000. My code is as below:

#define EMIF_ADDRESS_CS2 *(int *)0x69000000;

int main(void)
{
/* USER CODE BEGIN (3) */

systemREG1->GPREG1 = ((uint32)((uint32)1U << 31U) | systemREG1->GPREG1) ;
emif_ASYNC1Init();

while(1){
EMIF_ADDRESS_CS2 = 0xFF;}

/* USER CODE END */

return 0;
}

Suggest me where am going wrong.

Thanks

  • Hello,

    systemREG1->GPREG1 = ((uint32)((uint32)1U << 31U) | systemREG1->GPREG1) ;

    This line is not needed since this register has been programmed in sysInit().

    What is your question? What is the error message?

    If the SRAM is only 16MB, the 0x69000000 is an invalid address

    Try this one to check if it works:

        emif_ASYNC1Init();

       *(uint32_t *)0x68000000 = 0x12345678;
       *(uint32_t *)0x68000004 = 0xABCD5678;
       *(uint32_t *)0x68000008 = 0x89AB5678;
       *(uint32_t *)0x6800000C = 0x9ABC5678;

  • Hello Wang,

    The problem is I am unable to see the data on the data lines.

    According to my understanding if I #define the memory of CS4 i.e 0x68000000 as EMIF_ADDRESS_CS4 and write 8 bit to the address 0x68000000 than that 8 bit will be pushed to the data lines by DMA with CS been set to low but CS is always high in my case and there is no data on data lines.

    Thanks,

  • This device can support up to three asycn chip-select signals.

    Please call emif_ASYNC3Init() for using nCS[4]