mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2025-07-31 20:31:05 +00:00
update
This commit is contained in:
parent
54bf751b9c
commit
3a9b303c84
11 changed files with 46 additions and 18 deletions
|
|
@ -40,7 +40,7 @@ HalPinCtrlRtl8195A(
|
|||
IN BOOL Operation
|
||||
);
|
||||
|
||||
extern _LONG_CALL_ VOID
|
||||
extern _LONG_CALL_ int
|
||||
HalSerialPutcRtl8195a(
|
||||
IN u8 c
|
||||
);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ HalLogUartInit(
|
|||
);
|
||||
|
||||
|
||||
extern _LONG_CALL_ROM_ VOID
|
||||
extern _LONG_CALL_ROM_ int
|
||||
HalSerialPutcRtl8195a(
|
||||
IN u8 c
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* BootLoader Ver 0.3 (19/10/2017)
|
||||
* + Ver 0.4 (20/01/2018)
|
||||
* Created on: 12/02/2017
|
||||
* Author: pvvx
|
||||
*/
|
||||
|
|
@ -508,9 +509,14 @@ LOCAL const char * const txt_tab_seg[] = {
|
|||
"ROM" // 7
|
||||
};
|
||||
|
||||
LOCAL const uint32 tab_seg_def[] = { 0x10000000, 0x10070000, 0x1fff0000,
|
||||
0x20000000, 0x30000000, 0x30200000, 0x40000000, 0x40800000, 0x98000000,
|
||||
0xA0000000, 0xE0000000, 0xE0010000, 0x00000000, 0x00050000 };
|
||||
LOCAL const uint32 tab_seg_def[] = {
|
||||
0x10000000, 0x10070000,
|
||||
0x1fff0000, 0x20000000,
|
||||
0x30000000, 0x30200000,
|
||||
0x40000000, 0x40800000,
|
||||
0x98000000, 0xA0000000,
|
||||
0xE0000000, 0xE0010000,
|
||||
0x00000000, 0x00050000 };
|
||||
|
||||
LOCAL uint32 BOOT_RAM_TEXT_SECTION get_seg_id(uint32 addr, int32 size) {
|
||||
uint32 ret = SEG_ID_ERR;
|
||||
|
|
@ -518,7 +524,7 @@ LOCAL uint32 BOOT_RAM_TEXT_SECTION get_seg_id(uint32 addr, int32 size) {
|
|||
if (size > 0) {
|
||||
do {
|
||||
ret++;
|
||||
if (addr >= ptr[0] && addr + size <= ptr[1]) {
|
||||
if (addr >= ptr[0] && addr + size <= ptr[1] && size <= ptr[1] - ptr[0]) {
|
||||
return ret;
|
||||
};
|
||||
ptr += 2;
|
||||
|
|
|
|||
|
|
@ -185,7 +185,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();
|
||||
#ifdef 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 +203,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();
|
||||
|
|
@ -225,7 +230,7 @@ extern HAL_GPIO_ADAPTER gBoot_Gpio_Adapter;
|
|||
*/
|
||||
// SpicFlashInitRtl8195A(SpicDualBitMode); // SpicReadIDRtl8195A(); SpicDualBitMode
|
||||
//---- 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 :)
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue