Skip to main content
Trevor Jones
Senior
September 3, 2019
Question

H7 cant write a FMC 16bit word once

  • September 3, 2019
  • 2 replies
  • 887 views

if someone can tell me how to write a byte to a FMC memory ?

Reading a 16bit word looks correct and I can read the status correctly

but using A0 as register select, this is writing one 16bit word,

it seems to write 4 times, A0 is jumping up and down,

It doesn't work on my external LCD chip.

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
September 3, 2019
Trevor Jones
Senior
September 3, 2019

Yes, the Data cache is turned off.

will check your link,

yes it is fixed now.

thanks for that

void MPU_Config(void)
{
 MPU_Region_InitTypeDef MPU_InitStruct = {0};
 
 /* Disables the MPU */
 HAL_MPU_Disable();
 /** Initializes and configures the Region and the memory to be protected 
 */
 MPU_InitStruct.Enable = MPU_REGION_ENABLE;
 MPU_InitStruct.Number = MPU_REGION_NUMBER7;
 MPU_InitStruct.BaseAddress = 0x60000000;
 MPU_InitStruct.Size = MPU_REGION_SIZE_32B;
 MPU_InitStruct.SubRegionDisable = 0x0;
 MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
 MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
 MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
 MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
 MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
 MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
 
 HAL_MPU_ConfigRegion(&MPU_InitStruct);
 /* Enables the MPU */
 HAL_MPU_Enable(MPU_HFNMI_PRIVDEF);
 
}