2020-09-14 12:24 AM
HI~~
I test camera STM32H743.
When I enable D cache((SCB_EnableDCache ())),camera image breaking phenomenon.
When I disable D cache((SCB_EnableDCache ())),it is working well.
=======================================================================
int main(void)
{
Frame_Buffer = RAM_START; -> external memory : 0x68000000 size : 0x25800(320*240*2)
MPU_Config();
SCB_EnableICache();
SCB_EnableDCache();
MX_DMA_Init();
MX_DCMI_Init();
HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_CONTINUOUS, (uint32_t)Frame_Buffer, 76800);
}
void MPU_Config(void)
{
HAL_MPU_Disable()
MPU_InitStruct.Number = MPU_REGION_NUMBER4;
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.BaseAddress = 0x68000000;
MPU_InitStruct.Size = MPU_REGION_SIZE_256KB;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL2; // = DEVICE
MPU_InitStruct.SubRegionDisable = 0x00;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
===========================================================================
Let me know how to relsove this issue~~~
Please~~