mirror of
https://github.com/pvvx/RTL00MP3.git
synced 2025-07-31 12:41:06 +00:00
update
This commit is contained in:
parent
30b951832c
commit
39a516cd39
22 changed files with 98 additions and 3346 deletions
|
|
@ -46,6 +46,12 @@ void SYSPlatformInit(void);
|
|||
// Data declarations
|
||||
extern u8 __bss_start__, __bss_end__;
|
||||
extern const unsigned char cus_sig[32]; // images name
|
||||
/*
|
||||
#include "section_config.h"
|
||||
SECTION(".custom.validate.rodata")
|
||||
__attribute__ ((weak)) const unsigned char cus_sig[32] = "Customer Signature-modelxxx";
|
||||
*/
|
||||
|
||||
//extern HAL_TIMER_OP HalTimerOp;
|
||||
|
||||
IMAGE2_START_RAM_FUN_SECTION RAM_START_FUNCTION gImage2EntryFun0 =
|
||||
|
|
@ -185,7 +191,12 @@ extern HAL_GPIO_ADAPTER gBoot_Gpio_Adapter;
|
|||
_pHAL_Gpio_Adapter = &gBoot_Gpio_Adapter;
|
||||
VectorTableInitRtl8195A(STACK_TOP); // 0x1FFFFFFC
|
||||
loguart_wait_tx_fifo_empty(); // иначе глючит LogUART, если переключение CLK приходится на вывод символов !
|
||||
#if 1 // if set CLK CPU
|
||||
uint8 ChipId = HalGetChipId();
|
||||
#if 1 //def ARDUINO
|
||||
// 0 - 166666666 Hz, 1 - 83333333 Hz
|
||||
*((int *) (SYSTEM_CTRL_BASE + REG_SYS_SYSPLL_CTRL1)) &= ~(1 << 17); // REG_SYS_SYSPLL_CTRL1 &= ~BIT_SYS_SYSPLL_DIV5_3
|
||||
HalCpuClkConfig(ChipId < CHIP_ID_8195AM);
|
||||
#else // if set CLK CPU
|
||||
if(HalGetCpuClk() != PLATFORM_CLOCK) {
|
||||
//----- CLK CPU
|
||||
#if CPU_CLOCK_SEL_DIV5_3
|
||||
|
|
@ -198,7 +209,7 @@ extern HAL_GPIO_ADAPTER gBoot_Gpio_Adapter;
|
|||
HalCpuClkConfig(CPU_CLOCK_SEL_VALUE);
|
||||
#endif // CPU_CLOCK_SEL_DIV5_3
|
||||
};
|
||||
#endif
|
||||
#endif // ARDUINO
|
||||
PSHalInitPlatformLogUart(); // HalInitPlatformLogUartV02(); // Show "<RTL8195A>"... :(
|
||||
HalReInitPlatformTimer(); // HalInitPlatformTimerV02(); HalTimerOpInit_Patch((VOID*) (&HalTimerOp));
|
||||
SystemCoreClockUpdate();
|
||||
|
|
@ -226,7 +237,7 @@ extern HAL_GPIO_ADAPTER gBoot_Gpio_Adapter;
|
|||
// SpicFlashInitRtl8195A(SpicDualBitMode); // SpicReadIDRtl8195A(); SpicDualBitMode
|
||||
#ifdef CONFIG_SDR_EN
|
||||
//---- SDRAM
|
||||
uint8 ChipId = HalGetChipId();
|
||||
// uint8 ChipId = HalGetChipId();
|
||||
if (ChipId >= CHIP_ID_8195AM) {
|
||||
if((HAL_PERI_ON_READ32(REG_SOC_FUNC_EN) & BIT(21)) == 0) { // SDR not init?
|
||||
#ifdef FIX_SDR_CALIBRATION // for speed :)
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@
|
|||
//2 REG_RSVD
|
||||
|
||||
//2 REG_PESOC_CLK_SEL
|
||||
#define BIT_PESOC_SPI1_SCLK_SEL BIT(18)
|
||||
#define BIT_PESOC_SPI1_SCLK_SEL BIT(18) // =1 SPI1 Use High speed clock
|
||||
|
||||
#define BIT_SHIFT_PESOC_PERI_SCLK_SEL 16
|
||||
#define BIT_MASK_PESOC_PERI_SCLK_SEL 0x3 // 0 - CLK, 1 - CLK/2, 2 - CLK/4, 3 - CLK/8
|
||||
|
|
|
|||
|
|
@ -32,7 +32,12 @@ HAL_Status HalLogUartRstFIFO(HAL_LOG_UART_ADAPTER *pUartAdapter, u8 RstCtrl);
|
|||
VOID HalLogUartEnable(HAL_LOG_UART_ADAPTER *pUartAdapter);
|
||||
VOID HalLogUartDisable(HAL_LOG_UART_ADAPTER *pUartAdapter);
|
||||
*/
|
||||
extern VOID UartLogIrqHandleRam(VOID * Data);
|
||||
//extern VOID UartLogIrqHandleRam(VOID * Data);
|
||||
__attribute__ ((weak)) void UartLogIrqHandleRam(void * data)
|
||||
{
|
||||
HAL_UART_READ32(UART_REV_BUF_OFF);
|
||||
}
|
||||
|
||||
// extern DiagPrintf();
|
||||
// extern HalGetCpuClk(void);
|
||||
// extern VectorIrqUnRegisterRtl8195A();
|
||||
|
|
@ -55,8 +60,10 @@ extern VOID UartLogIrqHandleRam(VOID * Data);
|
|||
* (0.005/5)*166666666 = 166666.666
|
||||
*/
|
||||
VOID HalLogUartWaitTxFifoEmpty(VOID) {
|
||||
int x = 16384;
|
||||
while((!(HAL_READ8(LOG_UART_REG_BASE, 0x14) & BIT6)) && x--);
|
||||
if (HAL_PERI_ON_READ32(REG_SOC_FUNC_EN) & BIT_SOC_LOG_UART_EN) {
|
||||
int x = 16384;
|
||||
while ((!(HAL_UART_READ32(UART_LINE_STATUS_REG_OFF) & LSR_TEMT)) && x--);
|
||||
}
|
||||
}
|
||||
|
||||
//----- HalLogUartIrqRxRdyHandle
|
||||
|
|
|
|||
|
|
@ -93,8 +93,7 @@ void UartLogIrqHandleRam(void * Data) {
|
|||
// prvStrCpy(pUartLogCtl->pTmpLogBuf->UARTLogBuf, pUartLogCtl->pHistoryBuf[pUartLogCtl->SeeIdx]);
|
||||
// pUartLogCtl->pTmpLogBuf->BufCount = prvStrLen(pUartLogCtl->pTmpLogBuf->UARTLogBuf);
|
||||
// if(EchoFlag) pUartLogCtl->pfINPUT(pUartLogCtl->pTmpLogBuf->UARTLogBuf);
|
||||
UartLogHistoryCmd(UartReceiveData, (UART_LOG_CTL *) pUartLogCtl,
|
||||
1);
|
||||
UartLogHistoryCmd(UartReceiveData, (UART_LOG_CTL *) pUartLogCtl, 1);
|
||||
}
|
||||
} else {
|
||||
if (UartLogCmdChk(UartReceiveData, (UART_LOG_CTL *) pUartLogCtl, 1)
|
||||
|
|
@ -242,11 +241,13 @@ MON_RAM_TEXT_SECTION void RtlConsolTaskRam(void *Data) {
|
|||
}
|
||||
if(flg) DiagPrintf("cmd: %s - nothing!\n", ArgvArray[0]);
|
||||
#if defined(configUSE_WAKELOCK_PMU) && (configUSE_WAKELOCK_PMU == 1)
|
||||
release_wakelock(WAKELOCK_LOGUART);
|
||||
release_wakelock(WAKELOCK_LOGUART);
|
||||
//sdk4.0: pmu_release_wakelock(PMU_LOGUART_DEVICE);
|
||||
#endif
|
||||
}
|
||||
#if defined(configUSE_WAKELOCK_PMU) && (configUSE_WAKELOCK_PMU == 1)
|
||||
else acquire_wakelock(WAKELOCK_LOGUART);
|
||||
//sdk4.0: else pmu_acquire_wakelock(PMU_LOGUART_DEVICE);
|
||||
#endif
|
||||
p->pTmpLogBuf->BufCount = 0;
|
||||
p->pTmpLogBuf->UARTLogBuf[0] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue