markr1961 / PY32F030_Start_Kit

Puya PY32F030 Start Kit dev project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PY32F030 Project using IAR 8.4

Project home on github.com: markr1961/PY32F030_Start_Kit

Based on GitHub: markr1961 PY32F0xx_IAR_template Which is in turn based on the work from Jay Carlson's py32 template
The CMSIS core has been updated to a newer version, V5.3.2 dates 27. May 2021
Unlike the template, this project compiles fine with HAL DMA enabled in py32f0xx_hal_conf.h.

External links

Build Info

IAR 8.4.x
This project can be built using the IAR Kickstarter license.
The debug, linker and programming files are needed from the Puya file and copied to your IAR install.
Most LL_Flash and HAL_Flash can be compiled at the same time, but not DMA or USART. Needs investigation.

preprocessor defines

PY32F030x8
USE_HAL_DRIVER
USE_FULL_LL_DRIVER

include paths

$PROJ_DIR$\CMSIS\Device\PY32F0xx\Include
$PROJ_DIR$\CMSIS\Core\Include
$PROJ_DIR$\PY32F0xx_HAL_Driver\Inc
$PROJ_DIR$\Inc

Target: PY32F030K18T6 using a "PY32F030_Start Kit V1.3"

64K flash, 8K RAM
speed: 2x PLL -> 48 MHz from 24 MHz HSI
2 USARTS, 2 SPI, 1 I2C & 3 channel DMA
Timers: TIM1 + TIM3/14/16/17 + LPTIM
4x 7-segment LED driver
HW CRC - ?programable poly? LQFP32

Debuger & IDs

ST-Link v2 seems to work. Returns x453 "unknown CPU"
Puya DevID: RevID:

To Do & Experiment

Serial IRQ for comms.
SPI to gyro & ext flash
I2C EEPROM: DMA
LSE & WD?
IRDA?

-- commit notes --

05/25/2023 MAR
existing project blinks LED @ 10Hz, with EXTI IRQ handling button(key). When the button is pressed the main loop halts while it turns LED on for 1 second then off for one second.
fixed issues with compiling both HAL and LL in the same project.
now uses the correct CPU (Puya PY32F030x8)

06/26/2023 MAR
system clock is now running at 24MHz from HSI. 48MHz is possible. EXTI is used to sample user button. LED is a heartbeat with some button interaction. ADC is sampling PA4 & PA5 plus Vref and temp inputs. Pins PA6 & PA7 are set as analog inputs, but not sampled. Timer1 (should) be putting out RC servo compatible timing on PA8/9/10 but outputs are unverified. Add separate files for pin defs, GPIO, ADC and Timer init and SysFault IRQs

About

Puya PY32F030 Start Kit dev project


Languages

Language:C 98.5%Language:Assembly 1.5%