ST意法半导体
直播中

abdkjshd

9年用户 1258经验值
擅长:可编程逻辑
私信 关注
[问答]

在setup screen() 中将文本旋转270度时,文本区中的文本闪烁怎么解决?

当我在 setup screen() 中将文本旋转 270 度时。从 handletickEvent 我正在更改通配符文本以及我也在更改位置高度和宽度虽然我正在获取文本但它是颗粒状的......不清楚(我也包含了 invalidate() 函数
加载此图像

)。我尝试更改 alpha 和各种高度和宽度,但我仍然得到谷物.....









回帖(1)

王山崎

2023-1-13 14:33:54
是否配置了 MPU?我遇到了同样的问题,现在解决了,谢谢你
以下是ST员工给出的一些例子;只需在您的 main 中调用此函数即可。也许它需要您的修改 - 取决于帧缓冲区位置!


  • 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
  •   */



  •    //Range 0x60000000 to 0xE0000000
  • //Strongly ordered
  • // Disable code execution
  •   MPU_InitStruct.Enable = MPU_REGION_ENABLE;
  •   MPU_InitStruct.Number = MPU_REGION_NUMBER0;
  •   MPU_InitStruct.BaseAddress = 0;
  •   MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
  •   MPU_InitStruct.SubRegionDisable = 0x87;         //exclude first, second, third and last regions
  •   MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
  •   MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
  •   MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
  •   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);


  •   MPU_InitStruct.Enable = MPU_REGION_ENABLE;
  •   MPU_InitStruct.Number = MPU_REGION_NUMBER1;
  •   MPU_InitStruct.BaseAddress = 0x90000000;
  •   MPU_InitStruct.Size = MPU_REGION_SIZE_256MB;
  •   MPU_InitStruct.SubRegionDisable = 0x0;
  •   MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
  •   MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
  •   MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
  •   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);
  •   /** Initializes and configures the Region and the memory to be protected
  •   */
  •   MPU_InitStruct.Enable = MPU_REGION_ENABLE;
  •   MPU_InitStruct.Number = MPU_REGION_NUMBER1;
  •   MPU_InitStruct.BaseAddress = 0x90000000;
  •   MPU_InitStruct.Size = MPU_REGION_SIZE_64MB;
  •   MPU_InitStruct.SubRegionDisable = 0x0;
  •   MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
  •   MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
  •   MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
  •   MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
  •   MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE;
  •   MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;

  •   HAL_MPU_ConfigRegion(&MPU_InitStruct);
  •   /** Initializes and configures the Region and the memory to be protected
  •   */
  •   MPU_InitStruct.Enable = MPU_REGION_ENABLE;
  •   MPU_InitStruct.Number = MPU_REGION_NUMBER2;
  •   MPU_InitStruct.BaseAddress = 0x24000000;
  •   MPU_InitStruct.Size = MPU_REGION_SIZE_1MB;
  •   MPU_InitStruct.SubRegionDisable = 0x0;
  •   MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
  •   MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
  •   MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
  •   MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
  •   MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE;
  •   MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;

  •   HAL_MPU_ConfigRegion(&MPU_InitStruct);
  •   /** Initializes and configures the Region and the memory to be protected
  •   */
  •   MPU_InitStruct.Enable = MPU_REGION_ENABLE;
  •   MPU_InitStruct.Number = MPU_REGION_NUMBER3;
  •   MPU_InitStruct.BaseAddress = 0x24000000;
  •   MPU_InitStruct.Size = MPU_REGION_SIZE_256KB;
  •   MPU_InitStruct.SubRegionDisable = 0x0;
  •   MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
  •   MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
  •   MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
  •   MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
  •   MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE;
  •   MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE;

  •   HAL_MPU_ConfigRegion(&MPU_InitStruct);
  •   /* Enables the MPU */
  •   HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);

  • }



举报

更多回帖

发帖
×
20
完善资料,
赚取积分