-
keil MDK5编译NANO100报错,semihost例程无法通过
给位老师好,我的keil环境如下:在编译NANO100工程时,遇到如下问题:在retarget.c中找到SH_DoCommand这个函数,发现可能是版本或编译设置的问题,没被定义;采取直接的方法,将其复制放在voidSendChar(intch)函数上面,编译失败如下:由于水平有限,上面涉及汇编的关键词,不太理解。希望各位老师能帮忙看看,如何修改,可以实现调试的时候使用semihost功能?谢谢~
2024-04-16 7 -
GD32F105RCT6的can通信跑不通
购置了一款GD32F105RCT6的最小系统版,利用板子的CAN0,CAN1两路CAN,跑通了CAN通信,然后把程序烧录到产品板上,CAN通信就跑不通了,搞了三天了,百思不得其解,有大佬指导一下吗
2024-04-09 17 -
GD32F107VCT6-GD32F10X_CL 在哪里进行了宏定义
产品型号GD32F10X_CL在哪个文件内定义的?gd32f10x_gpio.h有如下代码,但搞不清楚GD32F10X_CL在哪里定义过?#ifdefGD32F10X_CL#defineGPIO_CAN0_PARTIAL_REMAP((uint32_t)0x001D4000U)/*!<CAN0partialremapping(onlyforGD32F10X_CLdevices)*/#defineGPIO_CAN0_FULL_REMAP((uint32_t)0x001D6000U)/*!<CAN0fullremapping(onlyforGD32F10X_CLdevices)*/#defineGPIO_ENET_REMAP((uint32_t)0x00200020U)/*!<ENETremapping(onlyforGD32F10X_CLdevices)*/#defineGPIO_CAN1_REMAP((uint32_t)0x00200040U)/*!<CAN1remapping(onlyforGD32F10X_CLdevices)*/#defineGPIO_TIMER1ITI1_REMAP((uint32_t)0x00202000U)/*!<TIMER1internaltrigger1remapping(onlyforGD32F10X_CLdevices)*/#defineGPIO_PTP_PPS_REMAP((uint32_t)0x00204000U)/*!<ethernetPTPPPSremapping(onlyforGD32F10X_CLdevices)*/#endif/*GD32F10X_CL*/
2024-04-04 1 -
国民技术n32g031睡眠模式无法唤醒
求问:n32g031单片机使用PWR_EnterSLEEPMode(SLEEP_ON_EXIT,PWR_SLEEPENTRY_WFI)进入睡眠模式后无法触发按键外部中断,以至于无法唤醒芯片继续运行。如果把此函数放在while(1)里面就可以,外边就不行!大家有遇到这个问题的吗~~~
2024-04-02 6 -
MM32G0001A 2个Timer各出1PWM 设置占空比不同 实际结果确一样
MM32G0001A使用两个定时器TIM14和TIM3各出一路PWM设置不一样的占空比但是实际结果确一样哪里设置有问题吗?voidTIM3_Configure(void){GPIO_InitTypeDefGPIO_InitStruct;TIM_OCInitTypeDefTIM_OCInitStruct;TIM_TimeBaseInitTypeDefTIM_TimeBaseStruct;/*ComputethevaluetobesetinARRregitertogeneratesignalfrequencyat100Khz*/uint32_tTimerPeriod=(TIM_GetTIMxClock(TIM3)/5000)-1;/*ComputeCCR1valuetogenerateadutycycleat80%forchannel1*/uint32_tChannel1Pulse=((uint32_t)800*(TimerPeriod-1))/1000;RCC_APB1PeriphClockCmd(RCC_APB1ENR_TIM3,ENABLE);TIM_TimeBaseStructInit(&TIM_TimeBaseStruct);TIM_TimeBaseStruct.TIM_Prescaler=0;TIM_TimeBaseStruct.TIM_CounterMode=TIM_CounterMode_Up;TIM_TimeBaseStruct.TIM_Period=TimerPeriod;TIM_TimeBaseStruct.TIM_ClockDivision=TIM_CKD_Div1;TIM_TimeBaseStruct.TIM_RepetitionCounter=0;TIM_TimeBaseInit(TIM3,&TIM_TimeBaseStruct);TIM_OCStructInit(&TIM_OCInitStruct);TIM_OCInitStruct.TIM_OCMode=TIM_OCMode_PWM1;TIM_OCInitStruct.TIM_OutputState=TIM_OutputState_Enable;TIM_OCInitStruct.TIM_Pulse=0;TIM_OCInitStruct.TIM_OCPolarity=TIM_OCPolarity_High;TIM_OCInitStruct.TIM_OCIdleState=TIM_OCIdleState_Set;TIM_OCInitStruct.TIM_Pulse=Channel1Pulse;TIM_OC1Init(TIM3,&TIM_OCInitStruct);RCC_AHBPeriphClockCmd(RCC_AHBENR_GPIOA,ENABLE);GPIO_PinAFConfig(GPIOA,GPIO_PinSource11,GPIO_AF_3);/*TIM1_CH1*/GPIO_StructInit(&GPIO_InitStruct);GPIO_InitStruct.GPIO_Pin=GPIO_Pin_11;GPIO_InitStruct.GPIO_Speed=GPIO_Speed_High;GPIO_InitStruct.GPIO_Mode=GPIO_Mode_AF_PP;GPIO_Init(GPIOA,&GPIO_InitStruct);TIM_Cmd(TIM3,ENABLE);TIM_CtrlPWMOutputs(TIM3,ENABLE);}/********************************************************************
2024-03-31 1