diff --git a/bsp/stm32/libraries/HAL_Drivers/SConscript b/bsp/stm32/libraries/HAL_Drivers/SConscript index de3b27a8725d484164d0f8426f830e6abe661501..f066538df193d57d99103c4e1f8772ec4cc6d8ff 100644 --- a/bsp/stm32/libraries/HAL_Drivers/SConscript +++ b/bsp/stm32/libraries/HAL_Drivers/SConscript @@ -54,6 +54,9 @@ if GetDepend(['RT_USING_PM', 'SOC_SERIES_STM32L4']): if GetDepend('BSP_USING_SDRAM'): src += ['drv_sdram.c'] +if GetDepend(['BSP_USING_NAND1']): + src += ['drv_nand.c'] + if GetDepend('BSP_USING_LCD'): src += ['drv_lcd.c'] diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_nand.c b/bsp/stm32/libraries/HAL_Drivers/drv_nand.c new file mode 100644 index 0000000000000000000000000000000000000000..100956675f1a26481a602dfd5a50a67ed4308e74 --- /dev/null +++ b/bsp/stm32/libraries/HAL_Drivers/drv_nand.c @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2006-2022, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2022-09-28 mingmiaojing first version + */ + +#include +#ifdef BSP_USING_NAND1 +#include +#include "drv_nand.h" +#include "drv_config.h" + +#include + +#define NAND_PAGE_SIZE ((uint16_t)2048) +#define NAND1_RW_TEST +#ifndef RT_FIOGETXIPADDR + #define RT_FIOGETXIPADDR 0x52540001U +#endif + +struct rt_device _hw_nand1; +NAND_HandleTypeDef hnand1; + +/* FSMC initialization function */ +static void rt_nand_init(void) +{ + /* USER CODE BEGIN FSMC_Init 0 */ + + /* USER CODE END FSMC_Init 0 */ + + FSMC_NAND_PCC_TimingTypeDef ComSpaceTiming = {0}; + FSMC_NAND_PCC_TimingTypeDef AttSpaceTiming = {0}; + + /* USER CODE BEGIN FSMC_Init 1 */ + + /* USER CODE END FSMC_Init 1 */ + + /** Perform the NAND1 memory initialization sequence + */ + hnand1.Instance = FSMC_NAND_DEVICE; + /* hnand1.Init */ + hnand1.Init.NandBank = FSMC_NAND_BANK2; + hnand1.Init.Waitfeature = FSMC_NAND_PCC_WAIT_FEATURE_ENABLE; + hnand1.Init.MemoryDataWidth = FSMC_NAND_PCC_MEM_BUS_WIDTH_8; + hnand1.Init.EccComputation = FSMC_NAND_ECC_ENABLE; + hnand1.Init.ECCPageSize = FSMC_NAND_ECC_PAGE_SIZE_512BYTE; + hnand1.Init.TCLRSetupTime = 0; + hnand1.Init.TARSetupTime = 0; + /* hnand1.Config */ + hnand1.Config.PageSize = NAND_PAGE_SIZE; + hnand1.Config.SpareAreaSize = 64; + hnand1.Config.BlockSize = 64; + hnand1.Config.BlockNbr = 1024; + hnand1.Config.PlaneNbr = 1; + hnand1.Config.PlaneSize = 1024; + hnand1.Config.ExtraCommandEnable = DISABLE; + /* ComSpaceTiming */ + ComSpaceTiming.SetupTime = 4; + ComSpaceTiming.WaitSetupTime = 3; + ComSpaceTiming.HoldSetupTime = 2; + ComSpaceTiming.HiZSetupTime = 4; + /* AttSpaceTiming */ + AttSpaceTiming.SetupTime = 4; + AttSpaceTiming.WaitSetupTime = 3; + AttSpaceTiming.HoldSetupTime = 2; + AttSpaceTiming.HiZSetupTime = 4; + + if (HAL_NAND_Init(&hnand1, &ComSpaceTiming, &AttSpaceTiming) != HAL_OK) + { + Error_Handler( ); + } + + /** Disconnect NADV + */ + + __HAL_AFIO_FSMCNADV_DISCONNECTED(); + + /* USER CODE BEGIN FSMC_Init 2 */ + + /* USER CODE END FSMC_Init 2 */ +} + +rt_err_t rt_nand_open(rt_device_t dev, rt_uint16_t oflag) +{ + return RT_EOK; +} + +rt_err_t rt_nand_control(rt_device_t dev, int cmd, void *args) +{ + if(RT_DEVICE_CTRL_BLK_GETGEOME == cmd) + { + struct rt_device_blk_geometry *geometry = (struct rt_device_blk_geometry *)args; + geometry->bytes_per_sector = 2048; + geometry->sector_count = 64 * 1024; + geometry->block_size = 2048 * 64; + return RT_EOK; + } + else if(RT_FIOGETXIPADDR == cmd) + { + uint32_t *start_addr = (uint32_t *)args; + *start_addr = 0; + return RT_EOK; + } + else if(RT_DEVICE_CTRL_BLK_ERASE == cmd) + { + uint32_t *blk = (uint32_t *)args; + NAND_AddressTypeDef Addr; + Addr.Plane = 0x00; + Addr.Block = *blk; + Addr.Page = 0x00; + HAL_NAND_Erase_Block(&hnand1,&Addr); + return RT_EOK; + } + + return RT_ERROR; +} + +/*pos: sector offset size: page count*/ +rt_size_t rt_nand_read(rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size) +{ + uint32_t page_cnt = size; + NAND_AddressTypeDef ReadAddr; + ReadAddr.Page = pos%64; + ReadAddr.Plane = 0; + ReadAddr.Block = pos/64; + HAL_NAND_Read_Page(&hnand1, &ReadAddr, (uint8_t *)buffer, page_cnt); + return RT_EOK; +} + +rt_size_t rt_nand_write(rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size) +{ + uint32_t page_cnt = size; + NAND_AddressTypeDef WriteAddr; + WriteAddr.Page = pos%64; + WriteAddr.Plane = 0; + WriteAddr.Block = pos/64; + HAL_NAND_Write_Page(&hnand1, &WriteAddr, (uint8_t *)buffer, page_cnt); + return RT_EOK; +} + +static int stm32_nand1_init(void) +{ + NAND_IDTypeDef NAND_ID; + rt_nand_init(); + HAL_NAND_Read_ID(&hnand1, &NAND_ID); + rt_kprintf("Nand Flash ID = 0x%02X,0x%02X,0x%02X,0x%02X", + NAND_ID.Maker_Id, NAND_ID.Device_Id, + NAND_ID.Third_Id, NAND_ID.Fourth_Id); + +#ifdef NAND1_RW_TEST + uint32_t i = 0; + static uint8_t TxBuffer [NAND_PAGE_SIZE]; + static uint8_t RxBuffer [NAND_PAGE_SIZE]; + NAND_AddressTypeDef WriteReadAddr; + + WriteReadAddr.Plane = 0x00; + WriteReadAddr.Block = 0x00; + WriteReadAddr.Page = 0x00; + + /* Erase the NAND first Block */ + for(i = 0; i < 64; i++) + { + WriteReadAddr.Block = i; + HAL_NAND_Erase_Block(&hnand1,&WriteReadAddr); + } + +// /* Fill the buffer to send */ +// for (i = 0; i < NAND_PAGE_SIZE; i++ ) +// { +// TxBuffer[i] = i; +// } +// +// /* Write data to FMC NAND memory */ +// HAL_NAND_Write_Page(&hnand1, &WriteReadAddr, TxBuffer, 1); +// rt_kprintf("\r\nWritten to the number:\r\n"); +// for(i = 0; i < 2048; i++) +// { +// rt_kprintf("0x%02X \t",TxBuffer[i]); +// } +// rt_kprintf("\n"); +// HAL_Delay(100); + /* Read data from FMC NAND memory */ + WriteReadAddr.Block = 0; + HAL_NAND_Read_Page(&hnand1, &WriteReadAddr, RxBuffer, 1); + rt_kprintf("\r\nRead receive: \r\n"); + for(i = 0; i < 16; i++) + { + rt_kprintf("0x%02X \t",RxBuffer[i]); + } + rt_kprintf("\n"); +#endif + + //_hw_nand1.ops = &_hw_nand1; + _hw_nand1.type = RT_Device_Class_MTD; + _hw_nand1.init = RT_NULL;//rt_nand_init + _hw_nand1.open = rt_nand_open; + _hw_nand1.close = RT_NULL; + _hw_nand1.read = rt_nand_read; + _hw_nand1.write = rt_nand_write; + _hw_nand1.control = rt_nand_control; + _hw_nand1.user_data = RT_NULL; + + rt_device_register(&_hw_nand1,"nand1", RT_DEVICE_FLAG_RDWR); + + rt_kprintf("nand1 init done\n"); + + lpm_init(); + lpm_dev_blk_append(&_hw_nand1); + return 0; +} +INIT_BOARD_EXPORT(stm32_nand1_init); + + +#endif diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_nand.h b/bsp/stm32/libraries/HAL_Drivers/drv_nand.h new file mode 100644 index 0000000000000000000000000000000000000000..6befa4822317f5d444f878ac15c9796fc1af0348 --- /dev/null +++ b/bsp/stm32/libraries/HAL_Drivers/drv_nand.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2006-2022, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2022-09-28 mingmiaojing first version + */ + +#ifndef __DRV_GPIO_H__ +#define __DRV_GPIO_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +int rt_hw_nand_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __DRV_GPIO_H__ */ + diff --git a/bsp/stm32/libraries/STM32F1xx_HAL/SConscript b/bsp/stm32/libraries/STM32F1xx_HAL/SConscript index 81a0c9b6842478a09b6bea7167ecd95c9e7e6d21..05f802bb1c0656eaf75b3f7a40395c605711876c 100644 --- a/bsp/stm32/libraries/STM32F1xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32F1xx_HAL/SConscript @@ -72,6 +72,7 @@ if GetDepend(['RT_USING_MTD_NOR']): src += ['STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_nor.c'] if GetDepend(['RT_USING_MTD_NAND']): + src += ['STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c'] src += ['STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_nand.c'] if GetDepend(['BSP_USING_EXT_SRAM']): diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/.mxproject b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/.mxproject index 59893b915bda7dee0fb9817cc212e7956f749914..89b2e55b636d64e67cbd372e503c08c1a825ca3b 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/.mxproject +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/.mxproject @@ -1,17 +1,17 @@ -[PreviousGenFiles] -HeaderPath=D:/work/rt-thread/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Inc -HeaderFiles=stm32f1xx_it.h;stm32f1xx_hal_conf.h;main.h; -SourcePath=D:/work/rt-thread/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src -SourceFiles=stm32f1xx_it.c;stm32f1xx_hal_msp.c;main.c; - [PreviousLibFiles] -LibFiles=Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_can.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_iwdg.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rtc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rtc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_sdmmc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sd.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_sdmmc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sd.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_can.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_iwdg.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rtc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rtc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_sdmmc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sd.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armcc_V6.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/core_cmSimd.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h; +LibFiles=Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_adc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_adc_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_def.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rcc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rcc_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_gpio.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_gpio_ex.h;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_dma_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_dma.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_cortex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_pwr.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_flash.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_flash_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_exti.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_can.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_fsmc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_nand.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_iwdg.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rtc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rtc_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_sdmmc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_sd.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_spi.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_tim.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_tim_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_uart.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_pcd.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_pcd_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_usb.h;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_adc.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_adc_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_can.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_fsmc.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_nand.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_iwdg.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rtc.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rtc_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_sdmmc.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_sd.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_spi.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pcd.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pcd_ex.c;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_usb.c;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_adc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_adc_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_def.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rcc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rcc_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_gpio.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_gpio_ex.h;Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_dma_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_dma.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_cortex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_pwr.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_flash.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_flash_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_exti.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_can.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_fsmc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_nand.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_iwdg.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rtc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_rtc_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_sdmmc.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_sd.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_spi.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_tim.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_tim_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_uart.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_pcd.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_pcd_ex.h;Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_ll_usb.h;Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f103xe.h;Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f1xx.h;Drivers\CMSIS\Device\ST\STM32F1xx\Include\system_stm32f1xx.h;Drivers\CMSIS\Device\ST\STM32F1xx\Source\Templates\system_stm32f1xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h; [PreviousUsedKeilFiles] -SourceFiles=..\Src\main.c;..\Src\stm32f1xx_it.c;..\Src\stm32f1xx_hal_msp.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_sdmmc.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sd.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c;..\\Src/system_stm32f1xx.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_sdmmc.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sd.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c;..\Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c;..\\Src/system_stm32f1xx.c;..\Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;; +SourceFiles=..\Src\main.c;..\Src\stm32f1xx_it.c;..\Src\stm32f1xx_hal_msp.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_adc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_adc_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_can.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_fsmc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_nand.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_iwdg.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rtc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rtc_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_sdmmc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_sd.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_spi.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pcd.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pcd_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_usb.c;..\Drivers\CMSIS\Device\ST\STM32F1xx\Source\Templates\system_stm32f1xx.c;..\\Src\system_stm32f1xx.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_adc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_adc_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_can.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_fsmc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_nand.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_iwdg.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rtc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rtc_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_sdmmc.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_sd.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_spi.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pcd.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pcd_ex.c;..\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_ll_usb.c;..\Drivers\CMSIS\Device\ST\STM32F1xx\Source\Templates\system_stm32f1xx.c;..\\Src\system_stm32f1xx.c;;; HeaderPath=..\Drivers\STM32F1xx_HAL_Driver\Inc;..\Drivers\STM32F1xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32F1xx\Include;..\Drivers\CMSIS\Include;..\Inc; CDefines=USE_HAL_DRIVER;STM32F103xE;USE_HAL_DRIVER;USE_HAL_DRIVER; [] SourceFiles=;; +[PreviousGenFiles] +HeaderPath=..\Inc +HeaderFiles=stm32f1xx_it.h;stm32f1xx_hal_conf.h;main.h; +SourcePath=..\Src +SourceFiles=stm32f1xx_it.c;stm32f1xx_hal_msp.c;main.c; + diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Inc/stm32f1xx_hal_conf.h b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Inc/stm32f1xx_hal_conf.h index d2dde68e8e766270e2cefefd4618d6b9626161c5..ad651b4c86eb4e354dbbe753dd0eba414c73c12d 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Inc/stm32f1xx_hal_conf.h +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Inc/stm32f1xx_hal_conf.h @@ -50,7 +50,7 @@ /*#define HAL_IRDA_MODULE_ENABLED */ #define HAL_IWDG_MODULE_ENABLED /*#define HAL_NOR_MODULE_ENABLED */ -/*#define HAL_NAND_MODULE_ENABLED */ +#define HAL_NAND_MODULE_ENABLED /*#define HAL_PCCARD_MODULE_ENABLED */ #define HAL_PCD_MODULE_ENABLED /*#define HAL_HCD_MODULE_ENABLED */ diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src/stm32f1xx_hal_msp.c b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src/stm32f1xx_hal_msp.c index 1f33ad7e9086f595f553269cffbd38b478109f3f..c5d351cf779ad63538ad433d8f034005f4c775ba 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src/stm32f1xx_hal_msp.c +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src/stm32f1xx_hal_msp.c @@ -645,7 +645,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart) GPIO_InitStruct.Pin = GPIO_PIN_10; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* USART1 interrupt Init */ @@ -675,7 +675,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart) GPIO_InitStruct.Pin = GPIO_PIN_3; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* USER CODE BEGIN USART2_MspInit 1 */ @@ -702,7 +702,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart) GPIO_InitStruct.Pin = GPIO_PIN_11; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /* USER CODE BEGIN USART3_MspInit 1 */ @@ -823,8 +823,120 @@ void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd) } +static uint32_t FSMC_Initialized = 0; + +static void HAL_FSMC_MspInit(void){ + /* USER CODE BEGIN FSMC_MspInit 0 */ + + /* USER CODE END FSMC_MspInit 0 */ + GPIO_InitTypeDef GPIO_InitStruct ={0}; + if (FSMC_Initialized) { + return; + } + FSMC_Initialized = 1; + + /* Peripheral clock enable */ + __HAL_RCC_FSMC_CLK_ENABLE(); + + /** FSMC GPIO Configuration + PE7 ------> FSMC_D4 + PE8 ------> FSMC_D5 + PE9 ------> FSMC_D6 + PE10 ------> FSMC_D7 + PD11 ------> FSMC_CLE + PD12 ------> FSMC_ALE + PD14 ------> FSMC_D0 + PD15 ------> FSMC_D1 + PD0 ------> FSMC_D2 + PD1 ------> FSMC_D3 + PD4 ------> FSMC_NOE + PD5 ------> FSMC_NWE + PD6 ------> FSMC_NWAIT + PD7 ------> FSMC_NCE2 + */ + GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_14|GPIO_PIN_15 + |GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5 + |GPIO_PIN_7; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_6; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); + + /* USER CODE BEGIN FSMC_MspInit 1 */ + + /* USER CODE END FSMC_MspInit 1 */ +} + +void HAL_NAND_MspInit(NAND_HandleTypeDef* hnand){ + /* USER CODE BEGIN NAND_MspInit 0 */ + + /* USER CODE END NAND_MspInit 0 */ + HAL_FSMC_MspInit(); + /* USER CODE BEGIN NAND_MspInit 1 */ + + /* USER CODE END NAND_MspInit 1 */ +} + +static uint32_t FSMC_DeInitialized = 0; + +static void HAL_FSMC_MspDeInit(void){ + /* USER CODE BEGIN FSMC_MspDeInit 0 */ + + /* USER CODE END FSMC_MspDeInit 0 */ + if (FSMC_DeInitialized) { + return; + } + FSMC_DeInitialized = 1; + /* Peripheral clock enable */ + __HAL_RCC_FSMC_CLK_DISABLE(); + + /** FSMC GPIO Configuration + PE7 ------> FSMC_D4 + PE8 ------> FSMC_D5 + PE9 ------> FSMC_D6 + PE10 ------> FSMC_D7 + PD11 ------> FSMC_CLE + PD12 ------> FSMC_ALE + PD14 ------> FSMC_D0 + PD15 ------> FSMC_D1 + PD0 ------> FSMC_D2 + PD1 ------> FSMC_D3 + PD4 ------> FSMC_NOE + PD5 ------> FSMC_NWE + PD6 ------> FSMC_NWAIT + PD7 ------> FSMC_NCE2 + */ + HAL_GPIO_DeInit(GPIOE, GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10); + + HAL_GPIO_DeInit(GPIOD, GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_14|GPIO_PIN_15 + |GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5 + |GPIO_PIN_6|GPIO_PIN_7); + + /* USER CODE BEGIN FSMC_MspDeInit 1 */ + + /* USER CODE END FSMC_MspDeInit 1 */ +} + +void HAL_NAND_MspDeInit(NAND_HandleTypeDef* hnand){ + /* USER CODE BEGIN NAND_MspDeInit 0 */ + + /* USER CODE END NAND_MspDeInit 0 */ + HAL_FSMC_MspDeInit(); + /* USER CODE BEGIN NAND_MspDeInit 1 */ + + /* USER CODE END NAND_MspDeInit 1 */ +} + /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src/stm32f1xx_it.c b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src/stm32f1xx_it.c index 8515d30cd2f04a3e21cb9b63731e105b5c87bc32..a68b06d68b397733c4f08e048211f74aeed4f384 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src/stm32f1xx_it.c +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/Src/stm32f1xx_it.c @@ -77,7 +77,7 @@ extern UART_HandleTypeDef huart1; /* USER CODE END EV */ /******************************************************************************/ -/* Cortex-M3 Processor Interruption and Exception Handlers */ +/* Cortex-M3 Processor Interruption and Exception Handlers */ /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. @@ -229,4 +229,4 @@ void USART1_IRQHandler(void) /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/stm32f103zet6.ioc b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/stm32f103zet6.ioc index 628c3c7a62d2150dc5b74e2a8e069230be9f276a..662cb205bff783f8d2cb3e82f25ebe53c87394ca 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/stm32f103zet6.ioc +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/CubeMX_Config/stm32f103zet6.ioc @@ -5,78 +5,111 @@ ADC1.NbrOfConversionFlag=1 ADC1.Rank-0\#ChannelRegularConversion=1 ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_1CYCLE_5 ADC1.master=1 -CAN.CalculateTimeBit=2000 -CAN.CalculateTimeQuantum=666.6666666666666 -CAN.IPParameters=CalculateTimeQuantum,CalculateTimeBit +CAN.CalculateBaudRate=749999 +CAN.CalculateTimeBit=1333 +CAN.CalculateTimeQuantum=444.44444444444446 +CAN.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate +FSMC.AttributeSpaceHiZSetupTime1=4 +FSMC.AttributeSpaceHoldSetupTime1=2 +FSMC.AttributeSpaceSetupTime1=4 +FSMC.AttributeSpaceWaitSetupTime1=3 +FSMC.CommonSpaceHiZSetupTime1=4 +FSMC.CommonSpaceHoldSetupTime1=2 +FSMC.CommonSpaceSetupTime1=4 +FSMC.CommonSpaceWaitSetupTime1=3 +FSMC.ECCPageSize1=FSMC_NAND_ECC_PAGE_SIZE_512BYTE +FSMC.EccComputation1=FSMC_NAND_ECC_ENABLE +FSMC.IPParameters=EccComputation1,ECCPageSize1,CommonSpaceSetupTime1,CommonSpaceWaitSetupTime1,CommonSpaceHoldSetupTime1,CommonSpaceHiZSetupTime1,AttributeSpaceSetupTime1,AttributeSpaceWaitSetupTime1,AttributeSpaceHoldSetupTime1,AttributeSpaceHiZSetupTime1,NandPageSize1,NandSpareAreaSize1,NandBlockSize1,NandBlockNbr1,NandPlaneNbr1,NandPlaneSize1 +FSMC.NandBlockNbr1=1024 +FSMC.NandBlockSize1=64 +FSMC.NandPageSize1=2048 +FSMC.NandPlaneNbr1=1024 +FSMC.NandPlaneSize1=1024 +FSMC.NandSpareAreaSize1=64 File.Version=6 KeepUserPlacement=false Mcu.Family=STM32F1 Mcu.IP0=ADC1 Mcu.IP1=CAN -Mcu.IP10=TIM2 -Mcu.IP11=TIM3 -Mcu.IP12=TIM4 -Mcu.IP13=TIM5 -Mcu.IP14=USART1 -Mcu.IP15=USART2 -Mcu.IP16=USART3 -Mcu.IP17=USB -Mcu.IP2=IWDG -Mcu.IP3=NVIC -Mcu.IP4=RCC -Mcu.IP5=RTC -Mcu.IP6=SDIO -Mcu.IP7=SPI1 -Mcu.IP8=SPI2 -Mcu.IP9=SYS -Mcu.IPNb=18 +Mcu.IP10=SYS +Mcu.IP11=TIM2 +Mcu.IP12=TIM3 +Mcu.IP13=TIM4 +Mcu.IP14=TIM5 +Mcu.IP15=USART1 +Mcu.IP16=USART2 +Mcu.IP17=USART3 +Mcu.IP18=USB +Mcu.IP2=FSMC +Mcu.IP3=IWDG +Mcu.IP4=NVIC +Mcu.IP5=RCC +Mcu.IP6=RTC +Mcu.IP7=SDIO +Mcu.IP8=SPI1 +Mcu.IP9=SPI2 +Mcu.IPNb=19 Mcu.Name=STM32F103Z(C-D-E)Tx Mcu.Package=LQFP144 Mcu.Pin0=PC14-OSC32_IN Mcu.Pin1=PC15-OSC32_OUT Mcu.Pin10=PB0 Mcu.Pin11=PB1 -Mcu.Pin12=PB10 -Mcu.Pin13=PB11 -Mcu.Pin14=PB13 -Mcu.Pin15=PB14 -Mcu.Pin16=PB15 -Mcu.Pin17=PC8 -Mcu.Pin18=PC9 -Mcu.Pin19=PA9 +Mcu.Pin12=PE7 +Mcu.Pin13=PE8 +Mcu.Pin14=PE9 +Mcu.Pin15=PE10 +Mcu.Pin16=PB10 +Mcu.Pin17=PB11 +Mcu.Pin18=PB13 +Mcu.Pin19=PB14 Mcu.Pin2=OSC_IN -Mcu.Pin20=PA10 -Mcu.Pin21=PA11 -Mcu.Pin22=PA12 -Mcu.Pin23=PA13 -Mcu.Pin24=PA14 -Mcu.Pin25=PC10 -Mcu.Pin26=PC11 -Mcu.Pin27=PC12 -Mcu.Pin28=PD2 -Mcu.Pin29=PB5 +Mcu.Pin20=PB15 +Mcu.Pin21=PD11 +Mcu.Pin22=PD12 +Mcu.Pin23=PD14 +Mcu.Pin24=PD15 +Mcu.Pin25=PC8 +Mcu.Pin26=PC9 +Mcu.Pin27=PA9 +Mcu.Pin28=PA10 +Mcu.Pin29=PA11 Mcu.Pin3=OSC_OUT -Mcu.Pin30=PB8 -Mcu.Pin31=PB9 -Mcu.Pin32=VP_IWDG_VS_IWDG -Mcu.Pin33=VP_RTC_VS_RTC_Activate -Mcu.Pin34=VP_SYS_VS_Systick -Mcu.Pin35=VP_TIM2_VS_ClockSourceINT -Mcu.Pin36=VP_TIM3_VS_ClockSourceINT -Mcu.Pin37=VP_TIM4_VS_ClockSourceINT -Mcu.Pin38=VP_TIM5_VS_ClockSourceINT +Mcu.Pin30=PA12 +Mcu.Pin31=PA13 +Mcu.Pin32=PA14 +Mcu.Pin33=PC10 +Mcu.Pin34=PC11 +Mcu.Pin35=PC12 +Mcu.Pin36=PD0 +Mcu.Pin37=PD1 +Mcu.Pin38=PD2 +Mcu.Pin39=PD4 Mcu.Pin4=PC1 +Mcu.Pin40=PD5 +Mcu.Pin41=PD6 +Mcu.Pin42=PD7 +Mcu.Pin43=PB5 +Mcu.Pin44=PB8 +Mcu.Pin45=PB9 +Mcu.Pin46=VP_IWDG_VS_IWDG +Mcu.Pin47=VP_RTC_VS_RTC_Activate +Mcu.Pin48=VP_SYS_VS_Systick +Mcu.Pin49=VP_TIM2_VS_ClockSourceINT Mcu.Pin5=PA2 +Mcu.Pin50=VP_TIM3_VS_ClockSourceINT +Mcu.Pin51=VP_TIM4_VS_ClockSourceINT +Mcu.Pin52=VP_TIM5_VS_ClockSourceINT Mcu.Pin6=PA3 Mcu.Pin7=PA5 Mcu.Pin8=PA6 Mcu.Pin9=PA7 -Mcu.PinsNb=39 +Mcu.PinsNb=53 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F103ZETx -MxCube.Version=5.4.0 -MxDb.Version=DB.5.0.40 +MxCube.Version=6.4.0 +MxDb.Version=DB.6.0.40 NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false NVIC.ForceEnableDMAVector=true @@ -129,10 +162,10 @@ PB15.Mode=Full_Duplex_Master PB15.Signal=SPI2_MOSI PB5.Signal=S_TIM3_CH2 PB8.Locked=true -PB8.Mode=Master +PB8.Mode=CAN_Activate PB8.Signal=CAN_RX PB9.Locked=true -PB9.Mode=Master +PB9.Mode=CAN_Activate PB9.Signal=CAN_TX PC1.Locked=true PC1.Signal=ADCx_IN11 @@ -150,16 +183,23 @@ PC8.Mode=SD_4_bits_Wide_bus PC8.Signal=SDIO_D0 PC9.Mode=SD_4_bits_Wide_bus PC9.Signal=SDIO_D1 -PCC.Checker=false -PCC.Line=STM32F103 -PCC.MCU=STM32F103Z(C-D-E)Tx -PCC.PartNumber=STM32F103ZETx -PCC.Seq0=0 -PCC.Series=STM32F1 -PCC.Temperature=25 -PCC.Vdd=3.3 +PD0.Signal=FSMC_D2_DA2 +PD1.Signal=FSMC_D3_DA3 +PD11.Signal=FSMC_A16_CLE +PD12.Signal=FSMC_A17_ALE +PD14.Signal=FSMC_D0_DA0 +PD15.Signal=FSMC_D1_DA1 PD2.Mode=SD_4_bits_Wide_bus PD2.Signal=SDIO_CMD +PD4.Signal=FSMC_NOE +PD5.Signal=FSMC_NWE +PD6.Signal=FSMC_NWAIT +PD7.Mode=NandChipSelect2_1 +PD7.Signal=FSMC_NCE2 +PE10.Signal=FSMC_D7_DA7 +PE7.Signal=FSMC_D4_DA4 +PE8.Signal=FSMC_D5_DA5 +PE9.Signal=FSMC_D6_DA6 PinOutPanel.RotationAngle=0 ProjectManager.AskForMigrate=true ProjectManager.BackupPrevious=false @@ -170,7 +210,7 @@ ProjectManager.CustomerFirmwarePackage= ProjectManager.DefaultFWLocation=true ProjectManager.DeletePrevious=true ProjectManager.DeviceId=STM32F103ZETx -ProjectManager.FirmwarePackage=STM32Cube FW_F1 V1.7.0 +ProjectManager.FirmwarePackage=STM32Cube FW_F1 V1.8.4 ProjectManager.FreePins=false ProjectManager.HalAssertFull=false ProjectManager.HeapSize=0x200 @@ -183,42 +223,69 @@ ProjectManager.PreviousToolchain= ProjectManager.ProjectBuild=false ProjectManager.ProjectFileName=stm32f103zet6.ioc ProjectManager.ProjectName=stm32f103zet6 +ProjectManager.RegisterCallBack= ProjectManager.StackSize=0x400 ProjectManager.TargetToolchain=MDK-ARM V5 ProjectManager.ToolChainLocation= ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART1_UART_Init-USART1-false-HAL-true,4-MX_SPI2_Init-SPI2-false-HAL-true,5-MX_USART2_UART_Init-USART2-false-HAL-true,6-MX_SPI1_Init-SPI1-false-HAL-true,7-MX_USART3_UART_Init-USART3-false-HAL-true,8-MX_ADC1_Init-ADC1-false-HAL-true,9-MX_RTC_Init-RTC-false-HAL-true,10-MX_IWDG_Init-IWDG-false-HAL-true,11-MX_TIM2_Init-TIM2-false-HAL-true,12-MX_TIM3_Init-TIM3-false-HAL-true,13-MX_TIM4_Init-TIM4-false-HAL-true,14-MX_TIM5_Init-TIM5-false-HAL-true,15-MX_SDIO_SD_Init-SDIO-false-HAL-true,16-MX_CAN_Init-CAN-false-HAL-true,17-MX_USB_PCD_Init-USB-false-HAL-true +ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART1_UART_Init-USART1-false-HAL-true,4-MX_SPI2_Init-SPI2-false-HAL-true,5-MX_USART2_UART_Init-USART2-false-HAL-true,6-MX_SPI1_Init-SPI1-false-HAL-true,7-MX_USART3_UART_Init-USART3-false-HAL-true,8-MX_ADC1_Init-ADC1-false-HAL-true,9-MX_RTC_Init-RTC-false-HAL-true,10-MX_IWDG_Init-IWDG-false-HAL-true,11-MX_TIM2_Init-TIM2-false-HAL-true,12-MX_TIM3_Init-TIM3-false-HAL-true,13-MX_TIM4_Init-TIM4-false-HAL-true,14-MX_TIM5_Init-TIM5-false-HAL-true,15-MX_SDIO_SD_Init-SDIO-false-HAL-true,16-MX_CAN_Init-CAN-false-HAL-true,17-MX_USB_PCD_Init-USB-false-HAL-true,18-MX_FSMC_Init-FSMC-false-HAL-true RCC.ADCFreqValue=12000000 -RCC.ADCPresc=RCC_ADCPCLK2_DIV4 -RCC.AHBFreq_Value=48000000 +RCC.ADCPresc=RCC_ADCPCLK2_DIV6 +RCC.AHBFreq_Value=72000000 RCC.APB1CLKDivider=RCC_HCLK_DIV2 -RCC.APB1Freq_Value=24000000 -RCC.APB1TimFreq_Value=48000000 -RCC.APB2Freq_Value=48000000 -RCC.APB2TimFreq_Value=48000000 -RCC.FCLKCortexFreq_Value=48000000 -RCC.FSMCFreq_Value=48000000 +RCC.APB1Freq_Value=36000000 +RCC.APB1TimFreq_Value=72000000 +RCC.APB2Freq_Value=72000000 +RCC.APB2TimFreq_Value=72000000 +RCC.FCLKCortexFreq_Value=72000000 +RCC.FSMCFreq_Value=72000000 RCC.FamilyName=M -RCC.HCLKFreq_Value=48000000 -RCC.I2S2Freq_Value=48000000 -RCC.I2S3Freq_Value=48000000 -RCC.IPParameters=ADCFreqValue,ADCPresc,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FSMCFreq_Value,FamilyName,HCLKFreq_Value,I2S2Freq_Value,I2S3Freq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,RTCClockSelection,RTCFreq_Value,SDIOFreq_Value,SDIOHCLKDiv2FreqValue,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value,VCOOutput2Freq_Value -RCC.MCOFreq_Value=48000000 -RCC.PLLCLKFreq_Value=48000000 -RCC.PLLMCOFreq_Value=24000000 -RCC.PLLMUL=RCC_PLL_MUL6 +RCC.HCLKFreq_Value=72000000 +RCC.I2S2Freq_Value=72000000 +RCC.I2S3Freq_Value=72000000 +RCC.IPParameters=ADCFreqValue,ADCPresc,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FSMCFreq_Value,FamilyName,HCLKFreq_Value,I2S2Freq_Value,I2S3Freq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,RTCFreq_Value,SDIOFreq_Value,SDIOHCLKDiv2FreqValue,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value,USBPrescaler,VCOOutput2Freq_Value +RCC.MCOFreq_Value=72000000 +RCC.PLLCLKFreq_Value=72000000 +RCC.PLLMCOFreq_Value=36000000 +RCC.PLLMUL=RCC_PLL_MUL9 RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE -RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE -RCC.RTCFreq_Value=32768 -RCC.SDIOFreq_Value=48000000 -RCC.SDIOHCLKDiv2FreqValue=24000000 -RCC.SYSCLKFreq_VALUE=48000000 +RCC.RTCFreq_Value=40000 +RCC.SDIOFreq_Value=72000000 +RCC.SDIOHCLKDiv2FreqValue=36000000 +RCC.SYSCLKFreq_VALUE=72000000 RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.TimSysFreq_Value=48000000 +RCC.TimSysFreq_Value=72000000 RCC.USBFreq_Value=48000000 +RCC.USBPrescaler=RCC_USBCLKSOURCE_PLL_DIV1_5 RCC.VCOOutput2Freq_Value=8000000 SH.ADCx_IN11.0=ADC1_IN11,IN11 SH.ADCx_IN11.ConfNb=1 +SH.FSMC_A16_CLE.0=FSMC_CLE,8b-dmux1 +SH.FSMC_A16_CLE.ConfNb=1 +SH.FSMC_A17_ALE.0=FSMC_ALE,8b-dmux1 +SH.FSMC_A17_ALE.ConfNb=1 +SH.FSMC_D0_DA0.0=FSMC_D0,8b-dmux1 +SH.FSMC_D0_DA0.ConfNb=1 +SH.FSMC_D1_DA1.0=FSMC_D1,8b-dmux1 +SH.FSMC_D1_DA1.ConfNb=1 +SH.FSMC_D2_DA2.0=FSMC_D2,8b-dmux1 +SH.FSMC_D2_DA2.ConfNb=1 +SH.FSMC_D3_DA3.0=FSMC_D3,8b-dmux1 +SH.FSMC_D3_DA3.ConfNb=1 +SH.FSMC_D4_DA4.0=FSMC_D4,8b-dmux1 +SH.FSMC_D4_DA4.ConfNb=1 +SH.FSMC_D5_DA5.0=FSMC_D5,8b-dmux1 +SH.FSMC_D5_DA5.ConfNb=1 +SH.FSMC_D6_DA6.0=FSMC_D6,8b-dmux1 +SH.FSMC_D6_DA6.ConfNb=1 +SH.FSMC_D7_DA7.0=FSMC_D7,8b-dmux1 +SH.FSMC_D7_DA7.ConfNb=1 +SH.FSMC_NOE.0=FSMC_NOE,8b-dmux1 +SH.FSMC_NOE.ConfNb=1 +SH.FSMC_NWAIT.0=FSMC_NWAIT,Wait1 +SH.FSMC_NWAIT.ConfNb=1 +SH.FSMC_NWE.0=FSMC_NWE,8b-dmux1 +SH.FSMC_NWE.ConfNb=1 SH.S_TIM3_CH2.0=TIM3_CH2,PWM Generation2 CH2 SH.S_TIM3_CH2.ConfNb=1 SH.S_TIM3_CH3.0=TIM3_CH3,PWM Generation3 CH3 @@ -226,12 +293,12 @@ SH.S_TIM3_CH3.ConfNb=1 SH.S_TIM3_CH4.0=TIM3_CH4,PWM Generation4 CH4 SH.S_TIM3_CH4.ConfNb=1 SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4 -SPI1.CalculateBaudRate=12.0 MBits/s +SPI1.CalculateBaudRate=18.0 MBits/s SPI1.Direction=SPI_DIRECTION_2LINES SPI1.IPParameters=VirtualType,Mode,Direction,BaudRatePrescaler,CalculateBaudRate SPI1.Mode=SPI_MODE_MASTER SPI1.VirtualType=VM_MASTER -SPI2.CalculateBaudRate=12.0 MBits/s +SPI2.CalculateBaudRate=18.0 MBits/s SPI2.Direction=SPI_DIRECTION_2LINES SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate SPI2.Mode=SPI_MODE_MASTER diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig b/bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig index 7fefaae9098dd9482a9069290f9f19486b12590c..3918589451bc597a6d0dbbd9efaf0a87757c3598 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig @@ -28,6 +28,13 @@ menu "Onboard Peripheral Drivers" select RT_SFUD_USING_SFDP default n + config BSP_USING_NAND1 + bool "Enable NAND1" + select RT_USING_NAND1 + select RT_USING_MTD_NAND + select PKG_USING_LPM + default n + config BSP_USING_RGB bool "Enable RGB LED (timer3 channel2 - 4)" select RT_USING_PWM