cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H750 with Dual-Flash , can not work after enable the TimeOutActivation in memorymapped mode.

fema
Associate III

If i enable the TimeOutActivation in the memorymappedmode then device hangup randomly. if i disable the TimeOutActivation then it work normally.

The code snippet as below :

QSPI_EnableMemoryMappedMode(QSPI_HandleTypeDef *hqspi)

 s_command.InstructionMode  = QSPI_INSTRUCTION_1_LINE;

 s_command.Instruction    = 0xEB; // QUAD_INOUT_FAST_READ_DTR_CMD; 

 s_command.AddressMode    = QSPI_ADDRESS_4_LINES;

 s_command.AddressSize    = QSPI_ADDRESS_24_BITS;

 s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_4_LINES; 

 s_command.AlternateBytesSize = QSPI_ALTERNATE_BYTES_8_BITS;

 s_command.AlternateBytes  = 0xFF; 

 s_command.DataMode     = QSPI_DATA_4_LINES;

 s_command.DummyCycles    = 4;

 s_command.DdrMode      = QSPI_DDR_MODE_DISABLE; 

 s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY;

 s_command.SIOOMode     = QSPI_SIOO_INST_EVERY_CMD;

 /* Configure the memory mapped mode */

 s_mem_mapped_cfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_ENABLE;

 s_mem_mapped_cfg.TimeOutPeriod   = 100;

I found this thread so i config the MPU as below but still won't work :

 MPU_InitStruct.Enable      = MPU_REGION_ENABLE;

 MPU_InitStruct.BaseAddress   = 0x0;

 MPU_InitStruct.Size       = MPU_REGION_SIZE_4GB;

 MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;

 MPU_InitStruct.IsBufferable   = MPU_ACCESS_NOT_BUFFERABLE;

 MPU_InitStruct.IsCacheable   = MPU_ACCESS_NOT_CACHEABLE;

 MPU_InitStruct.IsShareable   = MPU_ACCESS_NOT_SHAREABLE;

 MPU_InitStruct.Number      = MPU_REGION_NUMBER0;

 MPU_InitStruct.TypeExtField   = MPU_TEX_LEVEL0;

 MPU_InitStruct.SubRegionDisable = 0x87;

 MPU_InitStruct.DisableExec   = MPU_INSTRUCTION_ACCESS_DISABLE;

 HAL_MPU_ConfigRegion(&MPU_InitStruct);

 /* Configure the MPU attributes for the QSPI 32MB access */

 MPU_InitStruct.Enable      = MPU_REGION_ENABLE;

 MPU_InitStruct.BaseAddress   = QSPI_BASE_ADDRESS; // address is 0x90000000

 MPU_InitStruct.Size       = MPU_REGION_SIZE_32MB;

 MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;

 MPU_InitStruct.IsBufferable   = MPU_ACCESS_NOT_BUFFERABLE;

 MPU_InitStruct.IsCacheable   = MPU_ACCESS_CACHEABLE;

 MPU_InitStruct.IsShareable   = MPU_ACCESS_NOT_SHAREABLE;

 MPU_InitStruct.Number      = MPU_REGION_NUMBER1;

 MPU_InitStruct.TypeExtField   = MPU_TEX_LEVEL0;

 MPU_InitStruct.SubRegionDisable = 0x00;

 MPU_InitStruct.DisableExec   = MPU_INSTRUCTION_ACCESS_ENABLE;

 HAL_MPU_ConfigRegion(&MPU_InitStruct);

Any suggestion ..

2 REPLIES 2
Andreas Bolsch
Lead II

Although not mentioned in the H750 errata sheet, this might be "2.4.3 Memory-mapped read operations may fail when timeout counter is

enabled." in ES0334 Rev 6 for F76xxx. The QSPI is quite similar across device families ...

RChie.2
Associate II

Hi, I'm a colleague of Fema and currently investigating this issue together.

We're aware of the ERRATA of STM32F76x 2.4.3, but we have no clear idea about how to implement the workaround:

"Disable the timeout counter. To raise the chip select, perform an abort at the end of each memory-mapped operation."

The operation of memory-mapped mode is that we assign the s_command & s_mem_mapped_cfg, after that the read operations should be handled by the QSPI controller.

This project is battery-powered, and currently QSPI Flash consumes about 20% power of the whole device.

After timeout counter is enabled, QSPI consumption drops to 5%, but cannot last long before the device hang-up.

Any information on how to implement the workaround in ERRATA?