Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Nor Flash Forum Discussions

lcristovao
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi,

I need to access to external memory S29GL512S with a STM32H7, I verify that HAL drivers from ST don't work with Infineon memories, because only be prepared to work with AMD, FUJITSU, INTEL, and SHARP. I'm sorry because I don't have soo much experience working with parallel memories.
Anyone work before with STM32 devices and memories from family S29GLxxxS.
What is the best way to solve my problem?

Best regards,
Luis Cristóvão

0 Likes
1 Solution
Yuvraj
Moderator
Moderator
Moderator
250 sign-ins 50 solutions authored 100 replies posted

Hi,

 

For chip erase. The chip erase command sequence is initiated by writing two unlock cycles,
followed by a set up command. Two additional unlock write cycles are then followed by the chip erase command, which in turn invokes the Embedded Erase algorithm. 

 

 

Regards,

Yuvraj

View solution in original post

0 Likes
6 Replies
Yuvraj
Moderator
Moderator
Moderator
250 sign-ins 50 solutions authored 100 replies posted

Hi,

 

Thank you for contacting Infineon Technologies.

If your device STM32H7 can supports parallel interface then it should be possible it can access to external memory S29GL512S.

 

Here is the link to download low level drivers for parallel flash  https://www.infineon.com/dgdl/Infineon-Low_Level_Driver_for_NOR_Flash-Software-v01_00-EN.zip?fileId=... 

 

Thanks and Regards,

Yuvraj

0 Likes
lcristovao
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi,

I verified by your datasheet page 57 then I read the address 0x0026 I will be receive the value equal 0x0002. I have one example from STM32 working with S29GL128S. My code only don't work because when I try read Command Set I have the value 0xFE0F. Do you have any idea where come from  this value?

NOR_WRITE(NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_CMD_ADDRESS_FIRST_CFI), NOR_CMD_DATA_CFI);   // Read 0x0026
  hnor->CommandSet = *(__IO uint16_t *) NOR_ADDR_SHIFT(deviceaddress, uwNORMemoryDataWidth, NOR_ADDRESS_COMMAND_SET);  //CommandSet =0xFE0F


Best regards,

Luis Cristóvão

0 Likes
Yuvraj
Moderator
Moderator
Moderator
250 sign-ins 50 solutions authored 100 replies posted

Hi,

 

You have referred wrong data sheet, following is the correct data sheet which you need to refer  https://www.infineon.com/dgdl/Infineon-1_GBIT_(128_MBYTE)_512_MBIT_(64_MBYTE)_256_MBIT_(32_MBYTE)_12... 

 

You need to read more about CFI and its look up table. After that you can check whether you can write or read the data.

Please let us know if you still face any problem.

 

Thanks and Regards,

Yuvraj 

0 Likes
Yuvraj
Moderator
Moderator
Moderator
250 sign-ins 50 solutions authored 100 replies posted

Hi,

 

Are you able to read data after referring correct data sheet which I have mentioned in my previous response.

 

Also what I understood that you are reading  from  address 0x0026 which comes under CFI. Ideally 0x0002 should come but you are getting 0xFE0F. Correct me if I am getting this wrong.

 

Thanks and Regards,

Yuvraj

0 Likes

Hi,

Yes, I read this value. I solve this problem I thinks with this solution:

 

NOR_WRITE(NOR_ADDR_SHIFT(deviceAddress, 1, NOR_CMD_ADDRESS_FIRST_CFI), NOR_CMD_DATA_CFI);
  NOR_WRITE(NOR_ADDR_SHIFT(deviceAddress, 1, NOR_ADDRESS_COMMAND_SET), 0x0002);       FORCE value to 0x0002
  NOR_WRITE(NOR_ADDR_SHIFT(deviceAddress, 1, NOR_CMD_ADDRESS_FIRST_CFI), NOR_CMD_DATA_CFI);
  nor->CommandSet = *(__IO uint16_t *) NOR_ADDR_SHIFT(deviceAddress, uwNORMemoryDataWidth, NOR_ADDRESS_COMMAND_SET);    read the address of Command set 

 


But I don't know ,I try to use the low driver for read, write and erase all device. Sometimes I can write, others not. Read the address I can read all. Erase the device never put all values stored to 0xFFFF.

For erase chip I tried use this code:

 

  NOR_WRITE(deviceAddress+0x555, 0xaa);
  NOR_WRITE(deviceAddress+0x2aa, 0x55);
  NOR_WRITE(deviceAddress+0x555, 0x80);
  NOR_WRITE(deviceAddress+0x555, 0xaa);
  NOR_WRITE(deviceAddress+0x2aa, 0x55);
  NOR_WRITE(deviceAddress+0x555, 0x10);

 


I only can erase all device if I write in all address (one by one) the value 0xFFFF and take around 12 seconds to erase all device.

Best regards,
Luis Cristovão

 
0 Likes
Yuvraj
Moderator
Moderator
Moderator
250 sign-ins 50 solutions authored 100 replies posted

Hi,

 

For chip erase. The chip erase command sequence is initiated by writing two unlock cycles,
followed by a set up command. Two additional unlock write cycles are then followed by the chip erase command, which in turn invokes the Embedded Erase algorithm. 

 

 

Regards,

Yuvraj

0 Likes