سلام
من میخوام یه ال سی دی 7 اینچ رو با استفاده از توابع hal; ltdc و با میکروکنترلر stm32f429 راه اندازی کنم ( ابن میکرو ارزون ترین میکروییه که گیرم اومد و درایور داخلی ltdc داره )
یه سرچ که کردم اکثرا با استفاده از درایورهای آماده راه اندازیش کردن و هیچ کی مستقیم با میکرو راه اندازیش نکرده .
من دارم با IAR کد میزنم (که البته تو اصل داستان تفاوتی ایجاد نمیکنه )
برای این کار میخوام از توابع hal استفاده کنم
اینم فایل پروژه و کانفیگ هاش
و توضیحات لایبرری
اگه دوستان تجربه ای توی این زمینه داره لطفا به اشتراک بگذاره وگرنه دوستان یه کمک برسونن راهش بندازیم تو این تاپیک
من میخوام یه ال سی دی 7 اینچ رو با استفاده از توابع hal; ltdc و با میکروکنترلر stm32f429 راه اندازی کنم ( ابن میکرو ارزون ترین میکروییه که گیرم اومد و درایور داخلی ltdc داره )
یه سرچ که کردم اکثرا با استفاده از درایورهای آماده راه اندازیش کردن و هیچ کی مستقیم با میکرو راه اندازیش نکرده .
من دارم با IAR کد میزنم (که البته تو اصل داستان تفاوتی ایجاد نمیکنه )
برای این کار میخوام از توابع hal استفاده کنم
اینم فایل پروژه و کانفیگ هاش
و توضیحات لایبرری
کد:
[INDENT] [/INDENT] [FONT=Yekan][INDENT] ##### How to use this driver #####[/INDENT] [/FONT][FONT=Yekan][INDENT] ==============================================================================[/INDENT] [/FONT][FONT=Yekan][INDENT] [..][/INDENT] [/FONT][FONT=Yekan][INDENT] (#) Program the required configuration through the following parameters: [/INDENT] [/FONT][FONT=Yekan][INDENT] the LTDC timing, the horizontal and vertical polarity, [/INDENT] [/FONT][FONT=Yekan][INDENT] the pixel clock polarity, Data Enable polarity and the LTDC background color value [/INDENT] [/FONT][FONT=Yekan][INDENT] using HAL_LTDC_Init() function[/INDENT] [/FONT][FONT=Yekan][INDENT] [/INDENT] [/FONT][FONT=Yekan][INDENT] (#) Program the required configuration through the following parameters: [/INDENT] [/FONT][FONT=Yekan][INDENT] the pixel format, the blending factors, input alpha value, the window size [/INDENT] [/FONT][FONT=Yekan][INDENT] and the image size using HAL_LTDC_ConfigLayer() function for foreground[/INDENT] [/FONT][FONT=Yekan][INDENT] or/and background layer. [/INDENT] [/FONT][FONT=Yekan][INDENT] (#) Optionally, configure and enable the CLUT using HAL_LTDC_ConfigCLUT() and [/INDENT] [/FONT][FONT=Yekan][INDENT] HAL_LTDC_EnableCLUT functions.[/INDENT] [/FONT][FONT=Yekan][INDENT] (#) Optionally, enable the Dither using HAL_LTDC_EnableDither(). [/INDENT] [/FONT][FONT=Yekan][INDENT] [/INDENT] [/FONT][FONT=Yekan][INDENT] (#) Optionally, configure and enable the Color keying using HAL_LTDC_ConfigColorKeying()[/INDENT] [/FONT][FONT=Yekan][INDENT] and HAL_LTDC_EnableColorKeying functions.[/INDENT] [/FONT][FONT=Yekan][INDENT] [/INDENT] [/FONT][FONT=Yekan][INDENT] (#) Optionally, configure LineInterrupt using HAL_LTDC_ProgramLineEvent()[/INDENT] [/FONT][FONT=Yekan][INDENT] function[/INDENT] [/FONT][FONT=Yekan][INDENT] [/INDENT] [/FONT][FONT=Yekan][INDENT] (#) If needed, reconfigure and change the pixel format value, the alpha value[/INDENT] [/FONT][FONT=Yekan][INDENT] value, the window size, the window position and the layer start address [/INDENT] [/FONT][FONT=Yekan][INDENT] for foreground or/and background layer using respectively the following [/INDENT] [/FONT][FONT=Yekan][INDENT] functions: HAL_LTDC_SetPixelFormat(), HAL_LTDC_SetAlpha(), HAL_LTDC_SetWindowSize(),[/INDENT] [/FONT][FONT=Yekan][INDENT] HAL_LTDC_SetWindowPosition(), HAL_LTDC_SetAddress.[/INDENT] [/FONT][FONT=Yekan][INDENT] [/INDENT] [/FONT][FONT=Yekan][INDENT] (#) Variant functions with ԟNoReloadԠpost fix allows to set the LTDC configuration/settings without immediate reload.[/INDENT] [/FONT][FONT=Yekan][INDENT] This is useful in case when the program requires to modify serval LTDC settings (on one or both layers) [/INDENT] [/FONT][FONT=Yekan][INDENT] then applying(reload) these settings in one shot by calling the function ԈAL_LTDC_Reloadԍ[/INDENT] [/FONT][FONT=Yekan][INDENT] [/INDENT] [/FONT][FONT=Yekan][INDENT] After calling the ԟNoReloadԠfunctions to set different color/format/layer settings, [/INDENT] [/FONT][FONT=Yekan][INDENT] the program can call the function ԈAL_LTDC_ReloadԠTo apply(Reload) these settings. [/INDENT] [/FONT][FONT=Yekan][INDENT] Function ԈAL_LTDC_ReloadԠcan be called with the parameter ԒeloadTypeԠ[/INDENT] [/FONT][FONT=Yekan][INDENT] set to LTDC_RELOAD_IMMEDIATE if an immediate reload is required.[/INDENT] [/FONT][FONT=Yekan][INDENT] Function ԈAL_LTDC_ReloadԠcan be called with the parameter ԒeloadTypeԠ[/INDENT] [/FONT][FONT=Yekan][INDENT] set to LTDC_RELOAD_VERTICAL_BLANKING if the reload should be done in the next vertical blanking period, [/INDENT] [/FONT][FONT=Yekan][INDENT] this option allows to avoid display flicker by applying the new settings during the vertical blanking period.[/INDENT] [/FONT][FONT=Yekan][INDENT] (#) To control LTDC state you can use the following function: HAL_LTDC_GetState() [/INDENT] [/FONT][FONT=Yekan][INDENT] [/INDENT] [/FONT][FONT=Yekan][INDENT] *** LTDC HAL driver macros list ***[/INDENT] [/FONT][FONT=Yekan][INDENT] ============================================= [/INDENT] [/FONT][FONT=Yekan][INDENT] [..][/INDENT] [/FONT][FONT=Yekan][INDENT] Below the list of most used macros in LTDC HAL driver.[/INDENT] [/FONT][FONT=Yekan][INDENT] (+) __HAL_LTDC_ENABLE: Enable the LTDC.[/INDENT] [/FONT][FONT=Yekan][INDENT] (+) __HAL_LTDC_DISABLE: Disable the LTDC.[/INDENT] [/FONT][FONT=Yekan][INDENT] (+) __HAL_LTDC_LAYER_ENABLE: Enable a LTDC Layer.[/INDENT] [/FONT][FONT=Yekan][INDENT] (+) __HAL_LTDC_LAYER_DISABLE: Disable a LTDC Layer.[/INDENT] [/FONT][FONT=Yekan][INDENT] (+) __HAL_LTDC_CLEAR_FLAG: Clear the LTDC pending flags.[/INDENT] [/FONT][FONT=Yekan][INDENT] (+) __HAL_LTDC_ENABLE_IT: Enable the specified LTDC interrupts. [/INDENT] [/FONT][FONT=Yekan][INDENT] (+) __HAL_LTDC_DISABLE_IT: Disable the specified LTDC interrupts.[/INDENT] [/FONT][FONT=Yekan][INDENT] [..] [/INDENT] [/FONT][INDENT] [/INDENT]
دیدگاه