国民技术n32g457ve点亮led,自己编写led例程,类似stm32
#21ic问答# #申请开发板# #申请原创#N32G45x 系列采用 32 bit ARM Cortex-M4 内核,最高工作主频 144MHz,支持浮点运算和 DSP 指令,集成多达 512KB Flash,144KB SRAM,内置 4 个 12bit 5Msps ADC,4 路独立轨到轨运算放大器,7 个高速
比较器,2 个 1Msps 12bit DAC,支持多达 24 通道电容式触摸按键,集成多路 U(S)ART、I2C、SPI、
QSPI、USB、CAN、SDIO 通信接口,10/100M 以太以网及数字摄像头接口,内置密码算法硬件加速引擎
我用的是n32g457ve 用的GPIOA PA3,经过接触后,发现n32g45x的库的gpio结构体和stm32的库类似,只是部分地方不同
#include "led.h"
void LedInit(void)
{
GPIO_InitType GPIO_InitStructure;
RCC_EnableAPB2PeriphClk(RCC_APB2_PERIPH_GPIOA, ENABLE);
GPIO_InitStructure.Pin =GPIO_PIN_3;
GPIO_InitStructure.GPIO_Mode= GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitPeripheral(GPIOA, &GPIO_InitStructure);
GPIO_SetBits(GPIOA,GPIO_PIN_3);
}
#include "n32g45x.h"
#include <stdio.h>
#include <stdint.h>
#include "delay.h"
#include "led.h"
#ifdef USE_FULL_ASSERT
void assert_failed(const uint8_t* expr, const uint8_t* file, uint32_t line)
{
while (1)
{
}
}
#endif // USE_FULL_ASSERT
/**
* @briefMain program.
*/
int main(void)
{
LedInit();
while (1)
{
GPIO_SetBits(GPIOA,GPIO_PIN_3);
delay_ms(1000);
GPIO_ResetBits(GPIOA,GPIO_PIN_3);
delay_ms(1000);
}
}
文件附件在附件,
然后点dap下载就行
记得先安装好dap驱动
视频演示:https://www.bilibili.com/video/BV14L411F7uW/
keil5.36百度网盘:
链接:https://pan.baidu.com/s/1YmvRt8TtD8YxMaHlc9aMVg
提取码:2b1x
工程百度网盘:
链接:https://pan.baidu.com/s/1BrNHKJXupqQnN3p7Qisxlg
提取码:dbss
这个芯片支持RT系统,可玩性比较高。可惜我手上的435官方不支持。 kyzhd 发表于 2022-1-29 18:12
这个芯片支持RT系统,可玩性比较高。可惜我手上的435官方不支持。
自己移植呀? yanzhengxin1 发表于 2022-1-30 15:03
自己移植呀?
有移植教程吗?亲 kyzhd 发表于 2022-1-30 16:23
有移植教程吗?亲
https://www.rt-thread.org/document/site/#/ yanzhengxin1 发表于 2022-1-30 17:07
https://www.rt-thread.org/document/site/#/
RTT官网手把手教 yanzhengxin1 发表于 2022-1-30 17:08
RTT官网手把手教
谢谢老大指教,感谢 不错,谢谢!正在学习! 没有CANFD外设 板子还是很漂亮的 国民技术代理,有需要样品 demo板可以找我17688920889 mutable 发表于 2022-2-8 16:29
板子还是很漂亮的
对,外设很丰富 wuboy19 发表于 2022-5-10 12:18
对,外设很丰富
真相弄一个玩玩,就是最近太忙老
页:
[1]