Erasing sector in dual flash mode

Aperta
#11 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c
Ambito
embedded-iot

Direzione di ricerca

Locate CSP_QSPI_EraseSector() in the loader sources and trace how dual-flash addresses and erase ranges are calculated. Reproduce the listed sector cases on the STM32H745I-DISCO setup; done means erasing one sector leaves its adjacent sector unchanged, including alternating sectors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I faced an issue while I worked through the erasing cycle on STM32H745I-DISCO with dual MT25QL512ABB8ESF-0SIT QSPI flash. When the QSPI is in dual flash mode, the CSP_QSPI_EraseSector() method will erase the next or the previous sector as well (based on the destination sector) i.e:

#define MEMORY_SECTOR_SIZE 0x10000

  • If you erase sector 0 then sector 1 will be erased too ( CSP_QSPI_EraseSector(0 * MEMORY_SECTOR_SIZE, (0 + 1) * MEMORY_SECTOR_SIZE - 1) )
  • If you erase sector 1 then sector 0 will be erased too! ( CSP_QSPI_EraseSector(1 * MEMORY_SECTOR_SIZE, (1 + 1) * MEMORY_SECTOR_SIZE - 1) )
  • If you erase sector 2 then sector 3 will be erased too ( CSP_QSPI_EraseSector(2 * MEMORY_SECTOR_SIZE, (2 + 1) * MEMORY_SECTOR_SIZE - 1) )
  • If you erase sector 3 then sector 2 will be erased too! ( CSP_QSPI_EraseSector(3 * MEMORY_SECTOR_SIZE, (3 + 1) * MEMORY_SECTOR_SIZE - 1) )

and so on.

I didn't find any workaround to fix this issue so right now for the demo code to work I had to erase the sectors first and then run writing loop:

	 for (var = 0; var < SECTORS_COUNT; var++)
	 {
		 if (CSP_QSPI_EraseSector(var * MEMORY_SECTOR_SIZE, (var + 1) * MEMORY_SECTOR_SIZE - 1) != HAL_OK)
		 {
			 while (1) {}
		 }
	 }

	 for (var = 0; var < SECTORS_COUNT; var++)
	 {
		 if (CSP_QSPI_WriteMemory(buffer_test, var * MEMORY_SECTOR_SIZE, MEMORY_SECTOR_SIZE) != HAL_OK)
		 {
			 while (1) {}
		 }
	 }
Lingua principale
C
Stelle
188
Fork
93
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di STMicroelectronics/stm32-memory-loaders

Tutte le issue di STMicroelectronics/stm32-memory-loaders

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.