Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tools-mirror
Micropython
提交
64181b5f
M
Micropython
项目概览
tools-mirror
/
Micropython
12 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
Micropython
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
64181b5f
编写于
5月 20, 2019
作者:
C
Chris Mason
提交者:
Damien George
7月 08, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stm32: Add support for STM32L452 MCUs.
上级
eea61a09
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
143 addition
and
4 deletion
+143
-4
ports/stm32/adc.c
ports/stm32/adc.c
+3
-1
ports/stm32/boards/stm32l452_af.csv
ports/stm32/boards/stm32l452_af.csv
+85
-0
ports/stm32/boards/stm32l452xe.ld
ports/stm32/boards/stm32l452xe.ld
+34
-0
ports/stm32/dac.c
ports/stm32/dac.c
+13
-1
ports/stm32/dma.c
ports/stm32/dma.c
+2
-0
ports/stm32/dma.h
ports/stm32/dma.h
+2
-0
ports/stm32/flashbdev.c
ports/stm32/flashbdev.c
+4
-2
未找到文件。
ports/stm32/adc.c
浏览文件 @
64181b5f
...
...
@@ -145,7 +145,9 @@
#define VBAT_DIV (4)
#elif defined(STM32H743xx)
#define VBAT_DIV (4)
#elif defined(STM32L432xx) || defined(STM32L475xx) || \
#elif defined(STM32L432xx) || \
defined(STM32L451xx) || defined(STM32L452xx) || \
defined(STM32L462xx) || defined(STM32L475xx) || \
defined(STM32L476xx) || defined(STM32L496xx)
#define VBAT_DIV (3)
#else
...
...
ports/stm32/boards/stm32l452_af.csv
0 → 100644
浏览文件 @
64181b5f
Port,,AF0,AF1,AF2,AF3,AF4,AF5,AF6,AF7,AF8,AF9,AF10,AF11,AF12,AF13,AF14,AF15,,,
,,SYS_AF,TIM1/TIM2/LPTIM1,I2C4/TIM1/TIM2/TIM3,I2C4/USART2/CAN1/TIM1,I2C1/I2C2/I2C3/I2C4,SPI1/SPI2/I2C4,SPI3/DFSDM/COMP1,USART1/USART2/USART3,UART4/LPUART1/CAN1,CAN1/TSC,CAN1/USB/QUADSPI,,SDMMC1/COMP1/COMP2,SAI1,TIM2/TIM15/TIM16/LPTIM2,EVENTOUT,ADC,COMP,DAC
PortA,PA0,,TIM2_CH1,,,,,,USART2_CTS,UART4_TX,,,,COMP1_OUT,SAI1_EXTCLK,TIM2_ETR,EVENTOUT,ADC12_IN5,COMP1_INM,
PortA,PA1,,TIM2_CH2,,,I2C1_SMBA,SPI1_SCK,,USART2_RTS/USART2_DE,UART4_RX,,,,,,TIM15_CH1N,EVENTOUT,ADC12_IN6,COMP1_INP,
PortA,PA2,,TIM2_CH3,,,,,,USART2_TX,LPUART1_TX,,QUADSPI_BK1_NCS,,COMP2_OUT,,TIM15_CH1,EVENTOUT,ADC12_IN7,COMP2_INM,
PortA,PA3,,TIM2_CH4,,,,,,USART2_RX,LPUART1_RX,,QUADSPI_CLK,,,SAI1_MCLK_A,TIM15_CH2,EVENTOUT,ADC12_IN8,COMP2_INP,
PortA,PA4,,,,,,SPI1_NSS,SPI3_NSS,USART2_CK,,,,,,SAI1_FS_B,LPTIM2_OUT,EVENTOUT,ADC12_IN9,COMP1_INM/COMP2_INM,DAC1_OUT1
PortA,PA5,,TIM2_CH1,TIM2_ETR,,,SPI1_SCK,DFSDM1_CKOUT,,,,,,,,LPTIM2_ETR,EVENTOUT,ADC12_IN10,COMP1_IN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,,,,DFSDM_CKIN3,,,TSC_G4_IO1,,,SDMMC1_D6,,,EVENTOUT,,,
PortC,PC7,,,TIM3_CH2,,,,DFSDM_DATIN3,,,TSC_G4_IO2,,,SDMMC1_D7,,,EVENTOUT,,,
PortC,PC8,,,TIM3_CH3,,,,,,,TSC_G4_IO3,,,SDMMC1_D0,,,EVENTOUT,,,
PortC,PC9,,,TIM3_CH4,,,,,,,TSC_G4_IO4,USBNOE,,SDMMC1_D1,,,EVENTOUT,,,
PortC,PC10,TRACED1,,,,,,SPI3_SCK,USART3_TX,UART4_TX,TSC_G3_IO2,,,SDMMC1_D2,,,EVENTOUT,,,
PortC,PC11,,,,,,,SPI3_MISO,USART3_RX,UART4_RX,TSC_G3_IO3,,,SDMMC1_D3,,,EVENTOUT,,,
PortC,PC12,TRACED3,,,,,,SPI3_MOSI,USART3_CK,,TSC_G3_IO4,,,SDMMC1_CK,,,EVENTOUT,,,
PortC,PC13,,,,,,,,,,,,,,,,EVENTOUT,,,
PortC,PC14,,,,,,,,,,,,,,,,EVENTOUT,,,
PortC,PC15,,,,,,,,,,,,,,,,EVENTOUT,,,
PortD,PD0,,,,,,SPI2_NSS,,,,CAN1_RX,,,,,,EVENTOUT,,,
PortD,PD1,,,,,,SPI2_SCK,,,,CAN1_TX,,,,,,EVENTOUT,,,
PortD,PD2,TRACED2,,TIM3_ETR,,,,,USART3_RTS/USART3_DE,,TSC_SYNC,,,SDMMC1_CMD,,,EVENTOUT,,,
PortD,PD3,,,,,,SPI2_MISO,DFSDM_DATIN0,USART2_CTS,,,QUADSPI_BK2_NCS,,,,,EVENTOUT,,,
PortD,PD4,,,,,,SPI2_MOSI,DFSDM_CKIN0,USART2_RTS/USART2_DE,,,QUADSPI_BK2_IO0,,,,,EVENTOUT,,,
PortD,PD5,,,,,,,,USART2_TX,,,QUADSPI_BK2_IO1,,,,,EVENTOUT,,,
PortD,PD6,,,,,,,DFSDM_DATIN1,USART2_RX,,,QUADSPI_BK2_IO2,,,SAI1_S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EVENTOUT,,,
PortE,PE9,,TIM1_CH1,,,,,DFSDM_CKOUT,,,,,,,SAI1_FS_B,,EVENTOUT,,,
PortE,PE10,,TIM1_CH2N,,,,,,,,TSC_G5_IO1,QUADSPI_CLK,,,SAI1_MCLK_B,,EVENTOUT,,,
PortE,PE11,,TIM1_CH2,,,,,,,,TSC_G5_IO2,QUADSPI_BK1_NCS,,,,,EVENTOUT,,,
PortE,PE12,,TIM1_CH3N,,,,SPI1_NSS,,,,TSC_G5_IO3,QUADSPI_BK1_IO0,,,,,EVENTOUT,,,
PortE,PE13,,TIM1_CH3,,,,SPI1_SCK,,,,TSC_G5_IO4,QUADSPI_BK1_IO1,,,,,EVENTOUT,,,
PortE,PE14,,TIM1_CH4,TIM1_BKIN2,TIM1_BKIN2_COMP2,,SPI1_MISO,,,,,QUADSPI_BK1_IO2,,,,,EVENTOUT,,,
PortE,PE15,,TIM1_BKIN,,TIM1_BKIN_COMP1,,SPI1_MOSI,,,,,QUADSPI_BK1_IO3,,,,,EVENTOUT,,,
PortH,PH0,,,,,,,,,,,,,,,,EVENTOUT,,,
PortH,PH1,,,,,,,,,,,,,,,,EVENTOUT,,,
PortH,PH3,,,,,,,,,,,,,,,,,,,
ports/stm32/boards/stm32l452xe.ld
0 → 100644
浏览文件 @
64181b5f
/*
GNU linker script for STM32L452XE
*/
/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 384K /* sectors 0-191 */
FLASH_FS (r) : ORIGIN = 0x08060000, LENGTH = 128K /* sectors 192-255 */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 160K /* SRAM1, 128K + SRAM2, 32K */
}
/* produce a link error if there is not this amount of RAM for these sections */
_minimum_stack_size = 2K;
_minimum_heap_size = 16K;
/* Define the stack. The stack is full descending so begins just above last byte of RAM,
or bottom of FS cache.. Note that EABI requires the stack to be 8-byte aligned for a call. */
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
_ram_fs_cache_end = _ram_end;
_ram_fs_cache_start = _ram_fs_cache_end - 2K; /* fs cache = 2K */
_estack = _ram_fs_cache_start - _estack_reserve;
_sstack = _estack - 16K; /* stack = 16K */
_heap_start = _ebss; /* heap starts just after statically allocated memory */
_heap_end = _sstack; /* bss + heap = 142K, tunable by adjusting stack size */
_flash_fs_start = ORIGIN(FLASH_FS);
_flash_fs_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS);
ports/stm32/dac.c
浏览文件 @
64181b5f
...
...
@@ -148,8 +148,10 @@ STATIC void dac_set_value(uint32_t dac_channel, uint32_t align, uint32_t value)
uint32_t
base
;
if
(
dac_channel
==
DAC_CHANNEL_1
)
{
base
=
(
uint32_t
)
&
DAC
->
DHR12R1
;
#if !defined(STM32L452xx)
}
else
{
base
=
(
uint32_t
)
&
DAC
->
DHR12R2
;
#endif
}
*
(
volatile
uint32_t
*
)(
base
+
align
)
=
value
;
}
...
...
@@ -169,8 +171,10 @@ STATIC void dac_start_dma(uint32_t dac_channel, const dma_descr_t *dma_descr, ui
uint32_t
base
;
if
(
dac_channel
==
DAC_CHANNEL_1
)
{
base
=
(
uint32_t
)
&
DAC
->
DHR12R1
;
#if !defined(STM32L452xx)
}
else
{
base
=
(
uint32_t
)
&
DAC
->
DHR12R2
;
#endif
}
dma_nohal_deinit
(
dma_descr
);
...
...
@@ -185,7 +189,7 @@ STATIC void dac_start_dma(uint32_t dac_channel, const dma_descr_t *dma_descr, ui
typedef
struct
_pyb_dac_obj_t
{
mp_obj_base_t
base
;
uint8_t
dac_channel
;
// DAC_CHANNEL_1 or DAC_CHANNEL_2
uint8_t
dac_channel
;
// DAC_CHANNEL_1 or DAC_CHANNEL_2
. STM32L452 only has CHANNEL_1.
uint8_t
bits
;
// 8 or 12
uint8_t
outbuf_single
;
uint8_t
outbuf_waveform
;
...
...
@@ -200,8 +204,10 @@ STATIC void pyb_dac_reconfigure(pyb_dac_obj_t *self, uint32_t cr, uint32_t outbu
const
dma_descr_t
*
tx_dma_descr
;
if
(
self
->
dac_channel
==
DAC_CHANNEL_1
)
{
tx_dma_descr
=
&
dma_DAC_1_TX
;
#if !defined(STM32L452xx)
}
else
{
tx_dma_descr
=
&
dma_DAC_2_TX
;
#endif
}
dma_nohal_deinit
(
tx_dma_descr
);
dac_config_channel
(
self
->
dac_channel
,
cr
,
outbuf
);
...
...
@@ -234,8 +240,10 @@ STATIC mp_obj_t pyb_dac_init_helper(pyb_dac_obj_t *self, size_t n_args, const mp
mp_hal_pin_obj_t
pin
;
if
(
self
->
dac_channel
==
DAC_CHANNEL_1
)
{
pin
=
pin_A4
;
#if !defined(STM32L452xx)
}
else
{
pin
=
pin_A5
;
#endif
}
mp_hal_pin_config
(
pin
,
MP_HAL_PIN_MODE_ANALOG
,
MP_HAL_PIN_PULL_NONE
,
0
);
...
...
@@ -306,8 +314,10 @@ STATIC mp_obj_t pyb_dac_make_new(const mp_obj_type_t *type, size_t n_args, size_
uint32_t
dac_channel
;
if
(
dac_id
==
1
)
{
dac_channel
=
DAC_CHANNEL_1
;
#if !defined(STM32L452xx)
}
else
if
(
dac_id
==
2
)
{
dac_channel
=
DAC_CHANNEL_2
;
#endif
}
else
{
nlr_raise
(
mp_obj_new_exception_msg_varg
(
&
mp_type_ValueError
,
"DAC(%d) doesn't exist"
,
dac_id
));
}
...
...
@@ -446,8 +456,10 @@ mp_obj_t pyb_dac_write_timed(size_t n_args, const mp_obj_t *pos_args, mp_map_t *
const
dma_descr_t
*
tx_dma_descr
;
if
(
self
->
dac_channel
==
DAC_CHANNEL_1
)
{
tx_dma_descr
=
&
dma_DAC_1_TX
;
#if !defined(STM32L452xx)
}
else
{
tx_dma_descr
=
&
dma_DAC_2_TX
;
#endif
}
uint32_t
align
;
...
...
ports/stm32/dma.c
浏览文件 @
64181b5f
...
...
@@ -387,7 +387,9 @@ const dma_descr_t dma_I2C_1_TX = { DMA1_Channel6, DMA_REQUEST_3, dma_id_5, &dm
const
dma_descr_t
dma_I2C_1_RX
=
{
DMA1_Channel7
,
DMA_REQUEST_3
,
dma_id_6
,
&
dma_init_struct_spi_i2c
};
// DMA2 streams
const
dma_descr_t
dma_I2C_4_RX
=
{
DMA2_Channel1
,
DMA_REQUEST_0
,
dma_id_0
,
&
dma_init_struct_spi_i2c
};
const
dma_descr_t
dma_SPI_3_RX
=
{
DMA2_Channel1
,
DMA_REQUEST_3
,
dma_id_7
,
&
dma_init_struct_spi_i2c
};
const
dma_descr_t
dma_I2C_4_TX
=
{
DMA2_Channel2
,
DMA_REQUEST_0
,
dma_id_1
,
&
dma_init_struct_spi_i2c
};
const
dma_descr_t
dma_SPI_3_TX
=
{
DMA2_Channel2
,
DMA_REQUEST_3
,
dma_id_8
,
&
dma_init_struct_spi_i2c
};
/* not preferred streams
const dma_descr_t dma_ADC_1_RX = { DMA2_Channel3, DMA_REQUEST_0, dma_id_9, NULL };
...
...
ports/stm32/dma.h
浏览文件 @
64181b5f
...
...
@@ -93,6 +93,8 @@ extern const dma_descr_t dma_I2C_1_RX;
extern
const
dma_descr_t
dma_SPI_3_RX
;
extern
const
dma_descr_t
dma_SPI_3_TX
;
extern
const
dma_descr_t
dma_SDIO_0
;
extern
const
dma_descr_t
dma_I2C_4_TX
;
extern
const
dma_descr_t
dma_I2C_4_RX
;
#endif
...
...
ports/stm32/flashbdev.c
浏览文件 @
64181b5f
...
...
@@ -103,9 +103,11 @@ STATIC byte flash_cache_mem[0x4000] __attribute__((aligned(4))); // 16k
#define FLASH_MEM_SEG1_START_ADDR (0x08020000) // sector 1
#define FLASH_MEM_SEG1_NUM_BLOCKS (256) // Sector 1: 128k / 512b = 256 blocks
#elif defined(STM32L432xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L496xx)
#elif defined(STM32L432xx) || \
defined(STM32L451xx) || defined(STM32L452xx) || defined(STM32L462xx) || \
defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L496xx)
// The STM32L4
75/6 doesn't have CCRAM, so we use the 32K
SRAM2 for this, although
// The STM32L4
xx doesn't have CCRAM, so we use
SRAM2 for this, although
// actual location and size is defined by the linker script.
extern
uint8_t
_flash_fs_start
;
extern
uint8_t
_flash_fs_end
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录