【经验】中微半导体车规级MCU BAT32A237的RTC如何实现几秒的间隔中断功能
中微半导体推出的车规级MCU BAT32A237系列符合AEC-Q100汽车产品标准,工作温度为-40℃~125℃,支持32Pin~64Pin的多种QFN、LQFP封装。BAT32A237采用ARM的Cortex-M0+内核,最高可工作于48MHz主频,采用高速的嵌入式闪存(SRAM最大16KB,Flash最大128KB)。集成I2C、SPI、UART、LIN、CAN总线等多种标准接口,集成12bit ADC、温度传感器、8bit DAC、比较器,可编程增益放大器。BAT32A237还具有出色的低功耗性能,运行功耗为120μA/MHz@48MHz,在深度睡眠模式下功耗仅0.7μA。BAT32A237优秀的可靠性、丰富的集成外围功能以及出色的低功耗性能,广泛适用于车载产品的开发。
BAT32A237集成RTC实时时钟功能,当MCU外部没有使用32.768kHz晶振时,RTC可以采用内部的低速15kHz振荡器,但是不能进行年月日计数,只能使用固定周期中断功能。如图1所示。
图1 RTC使用注意事项
使用RTC的固定周期中断功能,可以通过图2的寄存器进行配置选择对应的间隔时间。从图中可以看出,只能配置为1秒、1分、1小时等固定的周期,如果想实现几秒、几分等时间周期中断,是否可以实现?
图2 固定周期中断间隔时间配置
要实现这种功能,可以采用DMA方式实现,在程序中加入下述代码:
DMAVEC->VEC[DMA_VECTOR_IT] = 5;
DMAVEC->CTRL[5].DMACR = (0 << CTRL_DMACR_SZ_Pos) | (0 << CTRL_DMACR_CHNE_Pos) | \
(0 << CTRL_DMACR_DAMOD_Pos) | (0 << CTRL_DMACR_SAMOD_Pos) | \
(1 << CTRL_DMACR_MODE_Pos) | (1 << CTRL_DMACR_RPTINT_Pos) | (0 << CTRL_DMACR_RPTSEL_Pos);
DMAVEC->CTRL[5].DMBLS = 1;
DMAVEC->CTRL[5].DMACT = 30; //因15位间隔定时器中断时间为1s,DMA传输次数为需要的唤醒时间(单位s)
DMAVEC->CTRL[5].DMRLD = 30;
DMAVEC->CTRL[5].DMSAR = (uint32_t)&unuse_buf[0];
DMAVEC->CTRL[5].DMDAR = (uint32_t)&unuse_buf[1];
/* init DMA registers */
CGC->PER1 |= CGC_PER1_DMAEN_Msk;
DMA->DMABAR = DMAVEC_BASE;
DMA_Enable(DMA_VECTOR_IT);
IT_Init(RTC_FSUB, 0x7fff);
IT_Start();
DMA需要在RAM中存储一段控制数据,所以需要在Target界面修改一下RAM的起始地址和大小,空一段区域出来。上面示例代码中“5"是控制数据在RAM中的位置,控制数据占16字节,故空的区域给0x100就可以了。
- |
- +1 赞 0
- 收藏
- 评论 0
本文由东方的风提供,版权归世强硬创平台所有,非经授权,任何媒体、网站或个人不得转载,授权转载时须注明“来源:世强硬创平台”。
相关研发服务和供应服务
相关推荐
【经验】如何升级中微半导体烧录器CMS-WRITERV8的固件?
中微CMS-WRITERV8是针对MCU设计的一款脱机烧录器,方便批量生产的需求。由于其上位机软件CMS_WriterPro的版本一般高于CMS-WRITERV8的固件,导致第一次使用时会提示烧录器版本和软件版本不匹配。
设计经验 发布时间 : 2023-01-04
【经验】使用中微的BAT32A237车规级MCU写DataFlash后程序空间数据被修改的解决办法
在使用BAT32A237的数据存储空间时,可能会导致程序被修改。本文介绍遇到这种情况的处理方式。中微推出的BAT32A237系列是工作温度为-40℃~125℃的车规级MCU,采用ARM的Cortex-M0+内核,最高可工作于48MHz主频。
设计经验 发布时间 : 2023-03-31
【经验】基于低功耗系列MCU BAT32G137实现小功率步进电机控制
BAT32G137是中微推出的低功耗系列MCU,主频可以达到48MHZ,本文章主要介绍使用G137上的资源配合步进电机驱动板来实现简单的步进电机的控制。
设计经验 发布时间 : 2023-06-29
雅特力(Artery)AT32全系列32位微控制器(MCU)选型指南(中文)
描述- 雅特力坚持自主研发,以科技创新引领智慧未来,专注于ARM® Cortex®-M4/M0+的32位微控制器研发与创新,提供高效能、高可靠性且具有竞争力的产品。自2018年正式对外销售至今,累积了相当多元的终端产品成功案例,广泛地覆盖工控、电机、车载、消费、商务、5G及物联网等领域,助力客户实现产业升级。
型号- AT32F413CCU7,AT32F437ZCT7,AT32A403ACGU7,AT32F405CCU7,AT32L021K6U7-4,AT32F421K6T7,AT32F437VMT7,AT32F425R8T7,AT32F437RGT7,AT32F423VBT7,AT32F423RBT7-7,AT32A403A 系列,AT32A403ACGT7,AT32A423RBT7-7,AT32A423CCU7,AT32F413CBT7,AT32F435CMT7,AT32F403ARCT7,AT32L021C4T7,AT32F435RCT7,AT32F435ZGT7,AT32F405CCT7,AT32F403ACET7,AT32F405 系列,AT32A423R8T7,AT32L021K8T7,AT32 WB SERIES,AT32A423CBT7,AT32L021F8P7,AT32F435CMU7,AT32F437VDT7,AT32F415KBU7-4,AT32F413CBU7,AT32F402CBT7,AT32F405KCU7-4,AT32F407RCT7,AT32L021G4U7,AT32F403ACGU7,AT32F425K8U7-4,AT32F402KBU7-4,AT32F425R8T7-7,AT32F415RCT7,AT32F423VCT7,AT32F402CBU7,AT32F423T8U7,AT32F425K6T7,AT32F435CDT7,AT32F405RBT7,AT32A403ARCT7,AT32F421K6U7,AT32F421G8U7,AT32F415RBT7-7,AT32F421F4P7,AT32A423CCT7,AT32 F SERIES,AT32WB415系列,AT32F413KCU7-4,AT32F425F6P7,AT32F423C8T7,AT32A403ACEU7,AT32F437VGT7,AT32F437ZMT7,AT32F423RCT7-7,AT32A423TBU7,AT32A423C8T7,AT32F421K8T7,AT32F435 系列,AT32F413C8T7,AT32F415RBT7,AT32F403ARET7,AT32F435CGT7,AT32A423K8U7-4,AT32A403ACET7,AT32F435VCT7,AT32A423C8U7,AT32F403ACGT7,AT32F421C4T7,AT32L021K6T7,AT32A423R8T7-7,AT32F403AVCT7,AT32L021F6P7,AT32F437ZDT7,AT32F415RCT7-7,AT32F435CGU7,AT32F415CCT7,AT32F405KBU7-4,AT32F407VCT7,AT32F405CBU7,AT32F415KCU7-4,AT32A423TCU7,AT32F407RET7,AT32 A,AT32A423CBU7,AT32F435RMT7,AT32L021K8U7,AT32L021,AT32 F,AT32 L,AT32A423KBU7-4,AT32F423C8U7,AT32F423 系列,AT32F435RDT7,AT32L021F8U7,AT32F425K8T7,AT32F405CBT7,AT32A403AVCT7,AT32F421K8U7,AT32A403ARET7,AT32F423TBU7,AT32F421K6U7-4,AT32F421F6P7,AT32F403A,AT32 L SERIES,AT32A403ACCU7,AT32F415CBT7,AT32F415R8T7,AT32F425F8P7,AT32A403A,AT32F437ZGT7,AT32F423R8T7,AT32F425C6U7,AT32A423T8U7,AT32F421K4U7-4,AT32A,AT32F437RCT7,AT32F423CCU7,AT32F402 系列,AT32F425 系列,AT32F402RCT7,AT32L021C8T7,AT32F403ARGT7,AT32WB415CCU7-7,AT32F415CCU7,AT32A403ACCT7,AT32F403AVET7,AT32F435RGT7,AT32F435VMT7,AT32F421C6T7,AT32A423VBT7,AT32L021K4U7-4,AT32L021K4T7,AT32F423TCU7,AT32F405RBT7-7,AT32F413KBU7-4,AT32F435ZCT7,AT32 A SERIES,AT32F423CCT7,AT32WB415,AT32L021F4P7,AT32L021G8U7,AT32F407VET7,AT32F407RGT7,AT32F403ACCU7,AT32L021K6U7,AT32F423CBU7,AT32F403A 系列,AT32A423RCT7-7,AT32F435VDT7,AT32F415CBU7,AT32L021K8U7-4,AT32A423VCT7,AT32L021F6U7,AT32A403AVET7,AT32 WB,AT32F413 系列,AT32F425K6U7-4,AT32F425C6T7,AT32F421G4U7,AT32F407 系列,AT32A403ARGT7,AT32A423KCU7-4,AT32F421F8P7,AT32F423CBT7,AT32F413RCT7,AT32F425R6T7-7,AT32F413,AT32F423V8T7,AT32F415,AT32家族,AT32F437VCT7,AT32F423KCU7-4,AT32F402CCT7,AT32F421K4T7,AT32F435CDU7,AT32F425C8U7,AT32F425R6T7,AT32F423RBT7,AT32A423 系列,AT32F423K8U7-4,AT32F421,AT32F402,AT32F421 系列,AT32F435VGT7,AT32F405,AT32A423RBT7,AT32L021C6T7,AT32F407,AT32F402CCU7,AT32F421C8T7,AT32F435CCT7,AT32F415 系列,AT32F403AVGT7,AT32F405RCT7,AT32F423R8T7-7,AT32F403ACCT7,AT32F435ZMT7,AT32A423V8T7,AT32F413RBT7,AT32F405RCT7-7,AT32F415C8T7,AT32F402RBT7-7,AT32F435,AT32F437,AT32F407VGT7,AT32F435CCU7,AT32L021G6U7,AT32,AT32F402RCT7-7,AT32F403ACEU7,AT32F415K8U7-4,AT32L021K4U7,AT32F415R8T7-7,AT32F437RDT7,AT32F423RCT7,AT32F437 系列,AT32F402KCU7-4,AT32F402RBT7,AT32F423,AT32F425,AT32F413CCT7,AT32A423RCT7,AT32F421K4U7,AT32F421K8U7-4,AT32L021F4U7,AT32F425C8T7,AT32F437RMT7,AT32A403AVGT7,AT32F421G6U7,AT32L021 系列,AT32F423KBU7-4,AT32F435ZDT7,AT32A423
曦华科技CVM012x——全球首款负载电容超纳法级车载触控MCU,正式通过ISO 26262功能安全产品认证
曦华科技CVM012x系列是全球首颗超越nF级负载电容限制的车载触控MCU,产品严格践行ISO26262:2018标准要求,经国际公认测试、检验和认证机构SGS 独立审核,近日获颁功能安全ASIL-B 产品认证证书,将助力曦华科技在国内和国际开拓更广阔的市场。
原厂动态 发布时间 : 2024-11-01
Top Chinese 8/32-bit MCU Manufacturers with ARM Cortex-M0, M0+, M3, M4 and Stable Supply
In the face of rising semiconductor raw material prices and a continued shortage of production capacity, Sekorm has joined Civil Technology, Arteli, Chipsea, China Microelectronics, Fudan Microelectronics, Aerospace Shun, and other mainstream MCU manufacturers to provide stable MCU supply guarantees
活动 发布时间 : 2022-06-21
微容科技(VIIYONG)车规系列片式多层陶瓷电容器选型指南
目录- 公司简介和产品介绍 产品型号规格及代码定义 车规MLCC产品范围 车规MLCC-C0G系列 车规MLCC-X7R系列 车规MLCC-X7S系列 车规MLCC-X7T系列 应用技术要求
型号- A360J0201C0G500NA,A271F0805C0G101NK,A271J0805C0G101NK,A392M0402X7R250NB,A331G0805C0G251NK,A1R2A0402C0G250NB,A100G0603C0G101ND,A0R5B0603C0G101ND,A821M0402X7R160NB,A471K0201X7R100NA,A471M0201X7R100NA,A392K0402X7R250NB,A821K0402X7R160NB,A1R8B0201C0G250NA,A3R0A0603C0G500ND,A272K0603X7R101ND,A272K0402X7R160NB,A226M1210X7S250N3,A272M0402X7R160NB,A102J1206C0G631N1,A105M0805X7S101NH,A102F1206C0G631N1,A103G1206C0G631N1,A2R7A0603C0G101ND,A2R7C0603C0G101ND,A8R2C0201C0G500NA,A1R5B0402C0G500NB,A105K0805X7S101NH,A102M0201X7R100NA,A225K0805X7R250N5,A226K1210X7S250N3,A473K0603X7R101ND,A3R0C0603C0G500ND,A102K0201X7R100NA,A225M0805X7R250N5,A122G0603C0G101ND,A180G0201C0G500NA,A180G0201C0G250NA,A683J1206C0G500N1,A5R6C0402C0G250NB,A0R6A0603C0G101ND,A332J0805C0G251NH,A561K0402X7R250NB,A104M0402X7R160NB,A227M1210X7T2R5N3,A683F1206C0G500N1,A562F1210C0G631NO,A3R6B0402C0G500NB,A1R3B0402C0G250NB,A153K0402X7R100NB,A104M0603X7R101ND,A562J1210C0G631NO,A101F0603C0G101ND,A103F1206C0G500NE,A153M0402X7R100NB,A472G1206C0G631N1,A104K0603X7R101ND,A332F0805C0G251NH,A105K0805X7R160N5,A221F0402C0G250NB,A240F0603C0G500ND,A153G1206C0G101NE,A105M0805X7R160N5,A6R0B0201C0G500NA,A6R0B0201C0G250NA,A9R0C0603C0G101ND,A103J0805C0G101NH,A332K0402X7R100NB,A6R2D0201C0G500NA,A221J0402C0G250NB,A7R5B0603C0G500ND,A7R5D0603C0G500ND,A240J0603C0G500ND,A183G1210C0G631NP,A6R0D0201C0G500NA,A222G1206C0G251NO,A332M0402X7R100NB,A563M0402X7R500NB,A8R0C0201C0G250NA,A1R1B0402C0G250NB,A151J0805C0G251NK,A103J1206C0G500NE,A8R2C0201C0G250NA,A561M0402X7R500NB,A103F0805C0G101NH,A563K0402X7R500NB,A104K0402X7R160NB,A151F0805C0G251NK,A561K0402X7R500NB,A121F0603C0G101ND,A123F1206C0G500NE,A360J0201C0G250NA,A392M0402X7R500NB,A1R0B0603C0G500ND,A121J0603C0G101ND,A123J1206C0G500NE,A223G0805C0G500N5,A392K0402X7R500NB,A823K0603X7R101ND,A182M0201X7R250NA,A823K0402X7R160NB,A272J0603C0G500ND,A102G0603C0G101ND,A471G0805C0G101NK,A823M0402X7R160NB,A333F1206C0G101NE,A6R0D0201C0G250NA,A104G1206C0G500N1,A152M0201X7R250NA,A681F0603C0G101ND,A681J0603C0G101ND,A152K0201X7R250NA,A221M0402X7R101NB,A1R6A0402C0G500NB,A272F0603C0G500ND,A333J1206C0G101NE,A221M0201X7R160NA,A223M0603X7R500ND,A3R3B0603C0G500ND,A8R0C0201C0G500NA,A471M0402X7R160NB,A1R2A0402C0G500NB,A1R2C0402C0G500NB,A1R3B0402C0G500NB,A101J0603C0G101ND,A360F0201C0G250NA,A1R6C0402C0G500NB,A223K0603X7R500ND,A823K0805X7R101N5,A471G0603C0G101ND,A221K0402X7R101NB,A823M0805X7R101N5,A272G0805C0G101NK,A471K0402X7R160NB,A390G0402C0G250NB,A472J0805C0G101NH,A221K0201X7R160NA,A682K0201X7R100NA,A8R0B0402C0G500NB,A8R0D0402C0G500NB,A5R0B0603C0G500ND,A682M0201X7R100NA,A560G0201C0G250NA,A220G0402C0G250NB,A820G0603C0G500ND,A271G1206C0G631NK,A123K0402X7R100NB,A122K0201X7R100NA,A101G0805C0G201ND,A472F0805C0G101NH,A182K0201X7R250NA,A123M0402X7R100NB,A1R0A0402C0G250NB,A272K0201X7R100NA,A1R0C0402C0G250NB,A471F1206C0G631NK,A471J1206C0G631NK,A152G0805C0G251NK,A272M0201X7R100NA,A102G0805C0G101NK,A122M0201X7R100NA,A4R0A0201C0G250NA,A683K0402X7R100NB,A0R9A0603C0G500ND,A562K0201X7R250NA,A6R8B0603C0G101ND,A1R2B0603C0G500ND,A561G1206C0G251NK,A1R6C0402C0G250NB,A3R3A0402C0G500NB,A222K0402X7R250NB,A240G0402C0G250NB,A270G0603C0G101ND,A2R0B0201C0G500NA,A1R5A0201C0G250NA,A330F0201C0G500NA,A682F1206C0G631N1,A3R0B0402C0G250NB,A182G0805C0G251NK,A1R8C0402C0G500NB,A183G1206C0G101NE,A563M0402X7R250NB,A330J0201C0G500NA,A1R0C0402C0G500NB,A3R9A0402C0G250NB,A106M0603X7T6R3NK,A472G0603C0G500ND,A2R4B0603C0G101ND,A120G0603C0G101ND,A273J1206C0G500NE,A102M0402X7R160NB,A821M0201X7R100NA,A391K0402X7R101NB,A822K0201X7R160NA,A102M0603X7R101ND,A473G1206C0G500N1,A1R5B0402C0G250NB,A682J1206C0G631N1,A273F1206C0G500NE,A822K0603X7R250ND,A391K0201X7R160NA,A1R5A0201C0G500NA,A101J0805C0G101ND,A820F0603C0G101ND,A6R2B0201C0G250NA,A104M0805X7R101N5,A820J0603C0G101ND,A106M0805X7S250NH,A7R0B0603C0G101ND,A101F0805C0G101ND,A682G0805C0G251NH,A223M0603X7R250ND,A183K0402X7R100NB,A4R0C0201C0G500NA,A822G0805C0G500N5,A361F1206C0G251NK,A681M0402X7R100NB,A5R1B0603C0G101ND,X7T系列,A222J0603C0G500ND,A122M0603X7R101ND,A431K0201X7R100NA,A0R7B0603C0G101ND,A5R1C0603C0G500ND,A682K0402X7R160NB,A221J1206C0G251NK,A6R2B0201C0G500NA,A360G0402C0G500NB,A220G0402C0G500NB,A391J1206C0G251NK,A4R3B0603C0G101ND,A471J0603C0G500ND,A271K0201X7R160NA,A3R3C0402C0G250NB,A271K0402X7R101NB,A273K0603X7R500ND,A105M0603X7R250ND,A1R6B0201C0G250NA,A122M0402X7R160NB,A152G0603C0G101ND,A152F1210C0G631NK,A474M0603X7R160ND,A153G1210C0G631NP,A471F0603C0G500ND,A152J1210C0G631NK,A682K0603X7R101ND,A222F0603C0G500ND,A391F1206C0G251NK,A683M0603X7R160ND,A4R3B0201C0G250NA,A5R6B0603C0G500ND,A1R1A0603C0G500ND,A3R6C0201C0G250NA,A183M0402X7R500NB,A1R5C0603C0G500ND,A180F0402C0G500NB,A222G1210C0G631NO,A5R6D0201C0G250NA,A8R2D0402C0G500NB,A3R6A0603C0G500ND,A272M0603X7R101ND,A1R1C0201C0G250NA,A473K0402X7R160NB,A681J0805C0G251NK,A182F1210C0G631NK,A1R8B0201C0G500NA,A474K0805X7S101NH,A821G0603C0G101ND,A475M0603X7T6R3NK,A182J1210C0G631NK,A473M0805X7R101N5,A106K0805X7T6R3NH,A240G0402C0G500NB,A8R0D0402C0G250NB,A331M0201X7R250NA,A560G0201C0G500NA,A6R2C0402C0G500NB,A390G0402C0G500NB,A221F120
曦华CVM012x车载触控MCU正式通过SGS功能安全产品认证
曦华科技CVM012x 系列车载触控MCU产品严格践行ISO26262:2018 标准要求,经国际公认测试、检验和认证机构SGS 独立审核,正式获颁功能安全ASIL-B 产品认证证书,助力曦华科技在国内、国际市场开拓。颁证仪式于SGS及中汽研联合举办的汽车电子芯片认证及功能安全技术开发研讨会同步开展,数十家上下游伙伴、媒体、友商共同见证这一重要时刻。
原厂动态 发布时间 : 2024-10-31
昂瑞微电子车规级蓝牙SoC芯片OM6650AM通过权威第三方测试机构AEC-Q100车规级认证
2023年9月,昂瑞微电子车规级蓝牙SoC芯片OM6650AM通过权威第三方测试机构AEC-Q100车规级认证,并已向各大车载应用厂商进行推广。显示了公司在布局车规级芯片产品线方面的实力和决心。
原厂动态 发布时间 : 2023-09-23
【媒体视角】降本增效大势所趋,电控MCU内卷加剧,中微半导体如何破局?
中微半导,作为国内电机控制MCU领域的新势力,凭借着在高压控制、智能化应用以及绿色能源技术方面的不断创新,正在为行业内的这些痛点提供新的解决方案。在苏州电动工具控制与充电技术研讨会上,中微半导的电机控制事业部总经理肖英进行了深入讲话,了解了公司如何通过技术创新和成本优化,来破解行业中的这些难题。
原厂动态 发布时间 : 2024-10-23
【经验】中微MCU CMS8S6990外部中断的使用方法
在使用中微MCU控制灯光的项目中,需要用到CMS8S6990的外部中断输入,使用P13作为按键的外部中断输入端口,在按照如下方式编写的程序后发现按键无法运行。问题分析:用户使用的外部中断方式检测按键输入,但是使用的却是读IO端口判断按键是否有输入。
设计经验 发布时间 : 2023-01-29
Cmsemicon Newly Launches 32-bit Industrial-Grade MCU BAT32G439 Series Operating at a Frequency of 128MHz
Cmsemicon recently expanded its BAT32G series with the addition of the 32-bit industrial-grade MCU family member, BAT32G439. It supports an industrial temperature range of -40℃ to 105℃, offering high reliability, rich peripheral resources, and powerful digital signal processing capabilities.
产品 发布时间 : 2024-08-23
【经验】中微半导体32位MCU BAT32G133如何选择ADC通道
中微半导体32位MCU BAT32G133的ADC和其他厂家的ADC有所区别,使用扫描模式时,如果分配的引脚有出入,将使扫描模式失败。本文介绍具体的注意事项。
设计经验 发布时间 : 2022-10-15
【IC】中微半导SC8P05x系列OTP MCU:高性价比IO型,简化外围配置,满足成本敏感型应用开发
中微半导体8位RISC架构IO型OTP MCU SC8P05x系列,标配比较器、LVD及3路以上PWM,外围配置简单并经成本优化,搭配高性价比解决方案,可灵活满足成本敏感型开发应用如小家电控制、玩具、小风扇、电动牙刷等。
产品 发布时间 : 2024-04-20
高性能车载MCU企业「曦华科技」完成超亿元A轮融资,多家车厂产业基金加持
近日,深圳曦华科技有限公司宣布完成超亿元A轮融资,本轮投资方均为新能源整车厂背景产业基金,所有老股东继续加注。据悉,本轮融资资金将主要用于研发后续芯片产品、充实研发团队、产品流片等。
原厂动态 发布时间 : 2024-08-14
电子商城
现货市场
服务
可定制变压器电压最高4.5KV,高频30MHz;支持平面变压器、平板变压器、OBC变压器、DCDC变压器、PLC信号变压器、3D电源、电流变压器、反激变压器、直流直流变压器、车载充电器变压器、门极驱动变压器等产品定制。
最小起订量: 100000 提交需求>
可定制LAMP LED、 CHIP LED、 PLCC LED、 汽车用车规级LED、COB LED的尺寸/电压/电流等参数,电压1.5-37V,电流5-150mA,波长470-940nm。
最小起订量: 30000 提交需求>
登录 | 立即注册
提交评论