rockbox/firmware/target/arm/stm32/echoplayer/lcd-echoplayer.h
Aidan MacDonald b155e2c35a echoplayer: modify LCD timings to disable PLL3 fractional mode
According to the datasheet, the PLL fractional mode is
apparently not supported in the medium VCO range.

The LCD isn't picky about front/back porch settings so
modify these to get a dot clock close to 6 MHz (within
~0.1% error).

Change-Id: I51647534db8c2b261391864db9262a0b04548e6d
2026-03-04 10:23:17 -05:00

62 lines
1.9 KiB
C

/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2025 Aidan MacDonald
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef __LCD_ECHOPLAYER_H__
#define __LCD_ECHOPLAYER_H__
#include "config.h"
/* Hsync pulse width in units of dot clocks */
#define LCD_HSW 14
/* Hsync back porch in units of dot clocks */
#define LCD_HBP 7
/* Horizontal active width in units of dot clocks */
#define LCD_HAW LCD_WIDTH
/* Hsync front porch in units of dot clocks */
#define LCD_HFP 7
/* Vsync pulse height in units of horizontal lines */
#define LCD_VSH 2
/* Vsync back porch in units of horizontal lines */
#define LCD_VBP 2
/* Vertical active height in units of horizontal lines */
#define LCD_VAH LCD_HEIGHT
/* Vsync front porch in units of horizontal lines */
#define LCD_VFP 2
/* Total horizontal width in dots */
#define LCD_HWIDTH (LCD_HSW + LCD_HBP + LCD_HAW + LCD_HFP)
/* Total vertical height in lines */
#define LCD_VHEIGHT (LCD_VSH + LCD_VBP + LCD_VAH + LCD_VFP)
/* Target frame rate */
#define LCD_FPS 70
/* Dot clock frequency */
#define LCD_DOTCLOCK_FREQ (LCD_FPS * LCD_HWIDTH * LCD_VHEIGHT)
#endif /* __LCD_ECHOPLAYER_H__ */