AnsweredAssumed Answered

LS1021A : Accessing NOR from bare metal application

Question asked by DWARKA PARADISE on Jun 24, 2016
Latest reply on Jun 24, 2016 by ufedor


Hello,

 

I am trying to access NOR from bare metal application. My understanding is as it is connected through IFC, we need to access NOR through IFC. Currently I can see as it is mapped at 0x60000000 and I can read the data directly from NOR as buffer. But I am not getting clear understanding how can i write, erase the NOR sectors. I am not able to understand how to send the program / erase command sequence to CFI NOR. Can you please provide some reference for the same?

 

So for writing as per CFI command sequence can I use something like below

Writing 0xAA at address 0x0x60000100

 

#define NOR_DEV_BASE_ADDRESS     0x60000000

 

{

  volatile uint16_t   *cfi_nor_flash_base = (volatile uint16_t *)NOR_DEV_BASE_ADDRESS;

  volatile uint8_t   *cfi_nor_flash_8x_base = (volatile uint8_t *)NOR_DEV_BASE_ADDRESS;

 

  cfi_nor_flash_base[0x555] = 0xAA;

  cfi_nor_flash_base[0x2AA] = 0x55;

  cfi_nor_flash_base[0x555] = 0xA0;

 

  cfi_nor_flash_8x_base[0x100] = 0xAA;

 

}

 

Thanks & Regards,

Amol M Shrotri

Outcomes