普冉PY32系列(一) PY32F0系列32位Cortex M0+ MCU简介

目录

PY32F0系列上市其实相当长一段时间了, 样品已经吃灰很久, 因为工作原因11月12月都很忙一直没时间, 最近终于有一点时间把功课做了.

PY32F0 简介

PY32F0 是普冉生产的 32位 ARM M0/M0+ 内核MCU, 价格在市场上非常有竞争性. 根据外设的丰富程度分为三个系列:

  • PY32F002B 系列, 型号暂时只有 PY32F002B, 24KF/3KR
  • PY32F0XX 系列, 型号有 PY32F002A, PY32F003X, PY32F030X, 容量最高到64KF+8KR
  • PY32F07X 系列, 型号有 PY32F040X, PY32F071X, PY32F072X, 容量最高到128KF+16KR

各系列都包含基础的外设 ADC, TIM, SPI, I2C, UART, 07X系列包含CAN和USB外设.

开发上, 因为是通用的 32位 M0内核, 可以在Keil5, IAR, VScode 等IDE上开发, 使用 STLink, DAPLink 或 JLink 烧录和调试.

从资料仓库可以下载最新的资料包, 资料包里包含全部型号的数据手册, 使用手册, 以及代码库, 代码示例.

芯岭科技 XL32F003, XL32F001

芯岭的 XL32F003 系列与 PY32F003 属于同内核产品. XL32F003 提供 4x4 脚间距0.4mm 的QFN32封装, 这个封装在 PY32F0 系列中没有, 如果需要超小封装的可以考虑. 芯岭还提供PY32与2.4G收发芯片的合封方案.

PY32F0 各系列具体配置对比

零售能见到的是 PY32F002A, PY32F003, PY32F030, 最后一个072还没见到实物. 从对寄存器的读写测试看, PY32F002A, PY32F003, PY32F030属于同一个内核的产品, 寄存器设置是通用的, 而 PY32F072 属于另一种内核, 因为在002A/003/032上读写072的寄存器地址无效.

每个系列的封装变化很多, 就算一个TSSOP20, 都有三四种引脚布局, 这里不按型号介绍了, 大致看一下各系列的容量和外设区别.

PY32F002B 系列

24K Flash, 3K RAM

PY32F002A 系列

  • 32-bit ARM® Cortex® - M0+ CPU
  • Up to 32 MHz operating frequency
    • Internal 8 / 24 MHz RC Oscillator (HSI)
    • Internal 32.768 KHz RC oscillator (LSI)
    • 4 to 24 MHz crystal oscillator (HSE)
  • Maximum 20 Kbytes of flash memory
  • Up to 3 Kbytes SRAM
  • 1 x 12-bit ADC
    • Supports up to 9 external input channels
  • 1 x 16bit advanced control timer (TIM1)
  • 1 x general purpose 16-bit timers (TIM16)
  • 1 x low-power timer (LPTIM), supports wake-up from stop mode
  • 1 x Independent Watchdog Timer (IWDT)
  • 1 x SysTick timer
  • 1 x Serial Peripheral Interface (SPI)
  • 1 x Universal Synchronous / Asynchronous Transceivers (USARTs) with automatic baudrate detection
  • 1 x I2C interface , supports standard mode (100kHz) , Fast mode (400 kHz) , supports 7-bit addressing mode
  • Hardware CRC-32 module
  • Comparator * 2
  • Unique UID
  • Serial wire debug (SWD)
  • Operating voltage: 1.7V to 5.5V
  • Working temperature: -40℃ to 85℃
  • Package: SOP8, SOP16, ESSOP10, TSSOP20, QFN16

大致的资源描述: 宽电压1.7V到5.5V, 最高支持32MHz时钟, 内建24MHz, 最高20KB的flash, 3KB的SRAM, 带ADC, TIM, 低功耗TIM, WDT, SPI, UART, I2C, 还带两个比较器.

  • 宽电压这点很强, 3.3V和5V都覆盖了
  • 存储也还不错, 相比 HK32F030MF4P6 和 CH32V003 的 16KB flash + 2KB RAM 容量更高
  • 该有的外设都有, 如果能带个I2S就更好(😄)
  • 比较器在有些场景下很有用, 省了外接了.

和 PY32F002 的区别:

  • 增加了比较器
  • 少了TIM6? 从启动文件比较看不出区别, 这个不确定

PY32F003 系列

  • 32-bit ARM® Cortex® - M0+ CPU
  • Up to 32 MHz operating frequency
    • Internal 4 /8/16/ 22.12 / 24 MHz RC Oscillator (HSI)
    • Internal 32.768 KHz RC oscillator (LSI)
    • 4 to 32 MHz crystal oscillator (HSE)
  • Maximum 64 Kbytes of flash memory
  • Up to 8 Kbytes SRAM
  • 3-channel DMA controller
  • 1 x 12-bit ADC
    • Supports up to 10 external input channels
  • 1 x 16bit advanced control timer (TIM1)
  • 4 x general purpose 16-bit timers (TIM3/TIM14/TIM16/TIM17)
  • 1 x low-power timer (LPTIM), supports wake-up from stop mode
  • 1 x Independent Watchdog Timer (IWDT)
  • 1 x Window Watchdog Timer (WWDT)
  • 1 x SysTick timer
  • RTC
  • 1 x Serial Peripheral Interface (SPI)
  • 2 x Universal Synchronous / Asynchronous Transceivers (USARTs) with automatic baudrate detection
  • 1 x I2C interface , supports standard mode (100kHz) , Fast mode (400 kHz) , supports 7-bit addressing mode
  • Hardware CRC-32 module
  • 2 x comparators
  • Unique UID
  • Serial wire debug (SWD)
  • Operating voltage: 1.7V to 5.5V
  • Working temperature: -40℃ to 85℃
  • Package: SOP8, SOP16, TSSOP20, QFN20

和 PY32F002A 的区别

  • 频率增加到最高 32MHz
  • Flash容量增加到最高 64 KBytes
  • RAM容量增加到最高 8 KBytes
  • 增加了 DMA
  • 增加了 WWDG
  • 增加了 RTC
  • 增加了 TIM3, TIM14, TIM17
  • 增加了 USART2

XL32F003 系列

这是芯岭科技出的一个型号系列, 放在这里是因为这个系列本质上和PY003系列是一样的, 但是只有64KF, 8KR的规格, 当前有三种封装:

  • TSSOP20: XL32F003TS20, 引脚布局和 PY32F003F2xP 系列一致
  • QFN20: XL32F003Q20, 引脚布局和 PY32F003F1xU, PY32F030F2xU 系列一致
  • QFN32: XL32F003Q32, 引脚布局和 PY32F030K2xM 系列一致, 封装更小, 是4x4的QFN, 脚间距0.4mm

PY32F030 系列

  • 32-bit ARM® Cortex® - M0+
  • Up to 48 MHz operating frequency
    • Internal 4/8/16/ 22.12/24 MHz RC oscillator (HSI)
    • Internal 32.768 KHz RC oscillator (LSI)
    • 4 to 32 MHz crystal oscillator (HSE)
    • 32.768KHz low speed crystal oscillator (LSE)
    • PLL (supports 2 frequency multiplication of HSI or HSE)
  • Up to 64 Kbytes flash memory
  • Up to 8 Kbytes SRAM
  • 3-channel DMA controller
  • 1 x 12-bit ADC
    • Supports up to 10 external input channels
  • 1 x 16bit advanced control timer (TIM1)
  • 4 x general purpose 16-bit timers (TIM3/TIM14/TIM16/TIM17)
  • 1 x low-power timer (LPTIM), supports wake-up from stop mode
  • 1 x Independent Watchdog Timer (IWDT)
  • 1 x Window Watchdog Timer (WWDT)
  • 1 x SysTick timer
  • RTC
  • 2 x Serial Peripheral Interface (SPI)
  • 2 x Universal Synchronous / Asynchronous Transceivers (USARTs) with automatic baudrate detection
  • 1 x I2C interface , supports standard mode (100kHz) , Fast mode (400 kHz) , supports 7-bit addressing mode
  • Support 4-bit 7-segment common cathode LED digital tube
  • Hardware CRC-32 module
  • 2 x comparators
  • Unique UID
  • Serial wire debug (SWD)
  • Operating voltage: 1.7 to 5.5 V
  • Working temperature: -40℃ to 85℃
  • Package: LQFP32, QFN32, TSSOP24, TSSOP20, QFN20

和 PY32F003 系列的区别

  • 频率增加到最高 48MHz
  • 支持 两倍PLL
  • 增加了 SPI2
  • 增加了 4位7段 LED数码管驱动

PY32F072 系列

从数据手册看, 与030系列相比Flash和RAM容量提升, 增加了LCD, CTC, TIM2, TIM6, TIM7, TIM15, I2C2, CAN, USB等外设. 根据手册上的寄存器测过002A/003/032, 应该是单独的核心, 与前面的三个型号不一样.

文末的彩蛋

  • PY32F002A 标称是20KB Flash + 3KB SRAM, 但是实际上现在买到的都是 32KB Flash + 4KB SRAM
  • 开发上, 直接使用PY32F030F16的设置就可以了, PY32F030的外设在 PY32F002A 上都有, 已经在 TSSOP20 封装的 PY32F002AF15P 上验证

相关链接

posted on 2023-01-14 15:05  Milton  阅读(6965)  评论(2编辑  收藏  举报

导航