From 6f35400812d89eca0971e8e9621030832b29f311 Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Tue, 3 Sep 2024 22:49:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B2=D0=B0=D1=8F=20=D0=BE?= =?UTF-8?q?=D0=BF=D1=82=D0=B8=D0=BC=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OS/app/app_cfg.h | 2 +- OS/bsp/LPC2368_Flash.icf | 13 ++++--------- OS/bsp/bsp.c | 6 +++--- settings/sk-mlpc2368.Flash_Central.general.xcl | 2 +- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/OS/app/app_cfg.h b/OS/app/app_cfg.h index 30ec9f6..80297f0 100644 --- a/OS/app/app_cfg.h +++ b/OS/app/app_cfg.h @@ -30,7 +30,7 @@ ********************************************************************************************************* */ -#define APP_TASK_START_STK_SIZE 128 +#define APP_TASK_START_STK_SIZE 256 #define NET_OS_CFG_TMR_TASK_STK_SIZE 300 #define NET_OS_CFG_IF_RX_TASK_STK_SIZE 640 #define APP_TASK_PHY_STK_SIZE 640 diff --git a/OS/bsp/LPC2368_Flash.icf b/OS/bsp/LPC2368_Flash.icf index 2baaf57..1ed14d4 100644 --- a/OS/bsp/LPC2368_Flash.icf +++ b/OS/bsp/LPC2368_Flash.icf @@ -5,9 +5,7 @@ define symbol __ICFEDIT_intvec_start__ = 0x00000000; /*-Memory Regions-*/ define symbol __ICFEDIT_region_ROM_start__ = 0x00000044; -define symbol __ICFEDIT_region_ROM_end__ = 0x0007CFFF; -define symbol __ICFEDIT_region_CONFIG_start__ = 0x0007D000; -define symbol __ICFEDIT_region_CONFIG_end__ = 0x0007DFFF; +define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; define symbol __ICFEDIT_region_RAM_start__ = 0x40000000; define symbol __ICFEDIT_region_RAM_end__ = 0x40007FFF; /*-Sizes-*/ @@ -17,14 +15,13 @@ define symbol __ICFEDIT_size_irqstack__ = 0x100; define symbol __ICFEDIT_size_fiqstack__ = 0x40; define symbol __ICFEDIT_size_undstack__ = 0x10; define symbol __ICFEDIT_size_abtstack__ = 0x10; +define symbol __ICFEDIT_size_heap__ = 0x2000; /**** End of ICF editor section. ###ICF###*/ define memory mem with size = 4G; define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region CONFIG_region = mem:[from __ICFEDIT_region_CONFIG_start__ to __ICFEDIT_region_CONFIG_end__]; - define symbol __region_USB_DMA_RAM_start__ = 0x7FD00000; define symbol __region_USB_DMA_RAM_end__ = 0x7FD01FFF; /*define region USB_DMA_RAM_region= mem:[from __region_USB_DMA_RAM_start__ to __region_USB_DMA_RAM_end__];*/ @@ -42,6 +39,7 @@ define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; initialize by copy { readwrite }; do not initialize { section .noinit }; @@ -51,12 +49,9 @@ do not initialize { section EMAC_DMA_RAM }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place in ROM_region { readonly }; - -place in CONFIG_region { readonly section .config}; - place in RAM_region { readwrite, block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, - block UND_STACK, block ABT_STACK}; + block UND_STACK, block ABT_STACK, block HEAP }; /*place in USB_DMA_RAM_region*/ /* { readwrite data section USB_DMA_RAM };*/ place in EMAC_DMA_RAM_region diff --git a/OS/bsp/bsp.c b/OS/bsp/bsp.c index f215b98..e8800de 100644 --- a/OS/bsp/bsp.c +++ b/OS/bsp/bsp.c @@ -464,10 +464,10 @@ static void PLL_Init (void) PLLFEED = 0x55; CPU_CRITICAL_EXIT(); - SCS |= DEF_BIT_00; /* enable fast IO */ SCS &= ~DEF_BIT_04; /* OSCRANGE = 0, Main OSC is between 1 and 20 Mhz */ SCS |= DEF_BIT_05; /* OSCEN = 1, Enable the main oscillator */ - + SCS |= DEF_BIT_00; /* access to all ports as fast io */ + while ((SCS & DEF_BIT_06) == 0) { /* Wait until OSCSTAT is set (Main OSC ready to be used) */ ; } @@ -564,7 +564,7 @@ static void GPIO_Init (void) { IO0DIR = 0; IO1DIR = 0; - FIO0DIR = 0x1000000; // хоппер уже настроили + FIO0DIR = 0; FIO1DIR = 0; FIO2DIR = 0; FIO3DIR = 0; diff --git a/settings/sk-mlpc2368.Flash_Central.general.xcl b/settings/sk-mlpc2368.Flash_Central.general.xcl index c8e6812..1602af9 100644 --- a/settings/sk-mlpc2368.Flash_Central.general.xcl +++ b/settings/sk-mlpc2368.Flash_Central.general.xcl @@ -2,7 +2,7 @@ "C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\bin\armJLINK.dll" -"C:\git_work\changer\Flash Central\Exe\version0_14.out" +"C:\git_work\changer\Flash Central\Exe\version0_31.out" --plugin="C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\bin\armbat.dll"