HR7P153: 8位RISC MCU详细规格与使用指南

需积分: 10 2 下载量 156 浏览量 更新于2024-07-17 收藏 1.13MB PDF 举报
HR7P153是一款由上海东软载波微电子有限公司生产的8位单片机,其核心是高效的HR7P RISC CPU内核,具有79条精简指令,执行速度较快,支持2MHz至20MHz的工作频率,适应不同电压范围。该芯片具有丰富的存储资源,包括2K字节的只读存储器(OTP)用于程序存储,以及64字节的静态随机访问存储器(SRAM)用于数据存储。程序存储器支持多种寻址方式,如直接、相对和查表读取,数据存储器支持直接和间接寻址。 I/O端口方面,HR7P153拥有13个通用输入输出端口(PA和PB),以及1个外部按键中断KINT输入,最多支持8个输入端。它还支持多个外部中断源,包括PINT和KINT,提供独立的可配置内部弱上/下拉输入,保证了对外部信号的精确捕捉和控制。此外,芯片内置上电复位(POR)、下电复位(BOR)电路以及低电压检测中断功能,同时也支持外部复位和独立硬件看门狗定时器,提供了多种复位选项以适应不同应用场景。 时钟系统方面,HR7P153集成有16MHz的高频RC振荡器和32KHz的低频RC振荡器,支持内外时钟源切换,时钟频率范围广泛,从32KHz到20MHz,有助于实现高效和灵活的系统时钟管理。此外,还支持时钟频率校准,出厂精度达到±2%,确保了时钟的稳定性和准确性。 外设功能强大,包含两个8位PWM时基定时器T8P1/T8P2,具备预分频和后分频的可配置性,计数器初值可编程,支持高达9位的PWM输出精度,这对于电机控制、音频应用等场景非常实用。 使用注意事项包括芯片的上电和下电管理,应遵循先上电后其他组件的原则,以防止过压或过流问题;复位机制要合理利用,如使用外部复位以增强可靠性;时钟管理要注意外部时钟源的稳定性和匹配调整;初始化阶段要确保寄存器、内存和I/O功能模块正确配置,避免上电后的不确定性;输入输出管脚的处理需注意电平范围和未使用的管脚处理方法,以降低噪声干扰。 HR7P153是一款性能出色、功能全面的8位单片机,适用于各种需要高效计算、精确控制和稳定时钟的工业级应用。在使用过程中,理解和遵循其特性和注意事项至关重要,以充分利用其潜在的优势并确保系统稳定运行。

Read Spd Begin... The memory on CH :1 are different! N: pre svc call fun = 0xc2000f04 -- pm-1 = 0, pm-2 = 29819750, pm-3 = 0 N: ddr fun = 0x0 -- pm = 0x29819750, pm2 = 0x0 N: parameter mcu: v0.5 Mcu Start Work ... get_clocks_value: scpi send command start: 0x10 scpi send command success get clocks = 533 MHZ pll_scp_num = 8 Lmu Freq = 1066Mhz ch = 0 parameter set ch closed! DIMM Don't Probed! ch = 1 the dimm info is from uboot... Dimm_Capacity = 8GB Mcu Channel 1 AES configuration begin... AES bypass end... TZC configuration begin... TZC bypass end... use_0x14 == 0xb0100 ctl_cfg_begin...... pi_cfg_begin...... phy_cfg_begin...... fast mode caslat = 15 wrlat = 14 tinit = 856000 r2r_diffcs_dly = 4 r2w_diffcs_dly = 5 w2r_diffcs_dly = 3 w2w_diffcs_dly = 7 r2w_samecs_dly = 4 w2r_samecs_dly = 0 r2r_samecs_dly = 0 w2w_samecs_dly = 0 ch 1 adapter_alg -- 0-0-0-0-0-0-0 rtt_wr = dis rtt_park = 80ohm ron = 34ohm val_cpudrv = 34 rtt_nom = 48ohm val_cpuodt = 48 vref_dev = 10 vrefsel = 0x45 dq_oe_timing = 0x42 rank_num_decode = 1 set phy_indep_init_mode set pi_dram_init_en set_pi_start & ctl_start...... wait init complete...... init complete done...... wait complete done...... rddqs_lat = 0x2 tdfi_phy_rdlat = 0x1f begin software ntp training... rank_num: 0 phy_write_path_lat_add =-1-1-1-1-1-1-1-1-1 phy_write_path_lat_add = 0 0 0 0 0 0 0 0 0 phy_write_path_lat_add = 1 1 1 1 1 1 1 1 1 phy_write_path_lat_add = 2 2 2 2 2 2 2 2 2 phy_write_path_lat_add = 3 3 3 3 3 3 3 3 3 phy_write_path_lat_add = 4 4 4 4 4 4 4 4 4 rank 0 wdqlvl! r2r_diffcs_dly = 4 r2w_diffcs_dly = 7 w2r_diffcs_dly = 4 w2w_diffcs_dly = 6 r2w_samecs_dly = 5 rank 0 ch 1 training fail

2023-06-02 上传

#include "global_define.h" uint8_t R_DiscOutVol_Cnt,R_Request_Num_BK,R_PPS_Request_Volt_BK; uint32_t R_PPS_Request_Cur_BK; uint8_t R_HVScan_RequestVol=0,R_HVScan_RequestVol_BK=0,Cnt_Delay_OutVol_Control=0; uint16_t R_VbatVol_Value,R_IbusCur_Value,R_IbatCur_Value; uint8_t R_Error_Time,R_WWDT_Time; TypeOfTimeFlag TimeFlag = {0}; TypeOfStateFlag StateFlag = {0}; //TypeOf_TypeC AP_TypeCA = {0}; TypeOf_TypeC AP_TypeCB = {0}; //TypeOf_PD AP_PDA = {0}; TypeOf_PD AP_PDB = {0}; const unsigned int CONFIG0 __at(0x00300000) = 0x0ED8F127; const uint32_t CONFIG1 __at(0x00300004) = 0x00C0FF3F; //ÓÐIAP¹¦ÄÜ,²»¿ª¿´ÃŹ·// //const unsigned int CONFIG1 __at(0x00300004) = 0x0040ffbf; const unsigned int CONFIG2 __at(0x00300008) = 0x1fffe000; const unsigned int CONFIG3 __at(0x0030000c) = 0x0000ffff; void SlotBranch100ms(void); void SlotBranch1s(void); volatile IsrFlag_Char R_Time_Flag; typedef struct{ uint8_t B_bit0: 1; }TestBits; TestBits Bits; #define check_8812 1 #define check_discharger 0 #define check_MOS 0 extern unsigned char display_gate; //¸Ãº¯ÊýÖ÷ÒªÓÃÀ´¼ì²émosµÄÓ¦Óᣠvoid check_nmos(void) { static unsigned int m,n=0; if(m<500) { m++; GPIO_WriteBit(GPIOB, GPIO_PinSource2, Bit_RESET); } else if(m<1000) { m++; GPIO_WriteBit(GPIOB, GPIO_PinSource2, Bit_SET); } else { m=0; } } unsigned char key_val=0; unsigned char device_state=0; unsigned int device_state_counter=0; #define device_state_counter_data 250 #define device_state_counter_data2 5 #define A_1 10 #define A_8 128 void led_inial(void) { DispBuf.Bits.FastCharge = RESET; DispInit(); } //Main function int main(void) { static unsigned int counter1,counter2=0,bufer; F_MCU_Initialization(); //MCU³õʼ»¯ HV_Init(); //*********************************************************************************** AP_TypeCB.TypeCx = TypeCB; AP_TypeCB.B_Support_HW = SET; AP_TypeCB.TypeC_Rp_Mode = TypeC_Cur

2023-07-11 上传