STM8L052驱动LCD字段屏,烧录成功程序后上电复位LCD屏能显示,但是在DEBUG时LCD屏不亮。用万用表测量,DEBUG模式SEG和COM口之间没有压差,上电复位正常显示时压差在1V左右。 DEBUG模式没有打断点,直接全速运行。 求各位大佬指教!!!!! 附程序如下: void main(void) { GPIO_Init(GPIOD,GPIO_Pin_5,GPIO_Mode_Out_PP_Low_Fast); GPIO_SetBits(GPIOD,GPIO_Pin_5); /* Configures the LCD GLASS relative GPIO port IOs and LCD peripheral */ LCD_GLASS_Init(); /* Enable RTC clock */ CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE); #if 1 /* Configures the RTC */ RTC_WakeUpClockConfig(RTC_WakeUpClock_CK_SPRE_16bits); RTC_ITConfig(RTC_IT_WUT, ENABLE); /* Enable general Interrupt*/ enableInterrupts(); #endif LCD->RAM[LCD_RAMRegister_0] = 0x00; LCD->RAM[LCD_RAMRegister_0] = 0xff; LCD->RAM[LCD_RAMRegister_1] = 0x00; LCD->RAM[LCD_RAMRegister_1] = 0xff; LCD->RAM[LCD_RAMRegister_2] = 0x00; LCD->RAM[LCD_RAMRegister_2] = 0xff; LCD->RAM[LCD_RAMRegister_3] = 0x00; LCD->RAM[LCD_RAMRegister_3] = 0xff; LCD->RAM[LCD_RAMRegister_4] = 0x00; LCD->RAM[LCD_RAMRegister_4] = 0xff; LCD->RAM[LCD_RAMRegister_5] = 0x00; LCD->RAM[LCD_RAMRegister_5] = 0xff; while (1) { LCD->RAM[LCD_RAMRegister_0] = 0x00; LCD->RAM[LCD_RAMRegister_0] = 0xff; } } /** * @brief Configures the LCD GLASS relative GPIO port IOs and LCD peripheral. * @param None * @retval None */ void LCD_GLASS_Init(void) { /* The LCD is configured as follow: - clock source = LSE (32.768 KHz) - Voltage source = Internal - Prescaler = 2 - Divider = 18 (16 + 2) - Mode = 1/4 Duty, 1/3 Bias - LCD frequency = (clock source * Duty) / (Prescaler * Divider) = 228 Hz ==> Frame frequency = 57 Hz */ // CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE); /* Enable LCD clock */ CLK_PeripheralClockConfig(CLK_Peripheral_LCD, ENABLE); CLK_RTCClockConfig(CLK_RTCCLKSource_LSE, CLK_RTCCLKDiv_1); LCD_DeInit(); /* Initialize the LCD */ LCD_Init(LCD_Prescaler_2, LCD_Divider_18, LCD_Duty_1_4, LCD_Bias_1_2, LCD_VoltageSource_External);//LCD_VoltageSource_InternalLCD_VoltageSource_External /* Mask register*/ LCD_PortMaskConfig(LCD_PortMaskRegister_0, 0xFF); LCD_PortMaskConfig(LCD_PortMaskRegister_1, 0x00); LCD_PortMaskConfig(LCD_PortMaskRegister_2, 0x00); LCD_PortMaskConfig(LCD_PortMaskRegister_3, 0x00); LCD_ContrastConfig(LCD_Contrast_Level_7); LCD_DeadTimeConfig(LCD_DeadTime_0); LCD_PulseOnDurationConfig(LCD_PulseOnDuration_1); // Delay_Ms(80); LCD_Cmd(ENABLE); /*!< Enable LCD peripheral */ } |
看看晶振在调试时是否震荡有异常 |
stm8l051f3 TSSOP20 封装,待机模式下,2天后,电流突然增加到140UA
stm8l050j3
STM8L050J3使用SWIM下载方式,无法下载,总是报错
STM8L52、在主频1M下I2C 100K 时序异常,在主频16M就没问题。这是什么原因
stm8l152 低功耗7uA,降不下来
STM8 flash 库函数 startaddress = startaddress + ((uint32_t)BlockNum * FLASH_BLOCK_S
stm 8 flash 在RAM运行代码的问题,是不是库函数有问题 Library call (?sll32_l0_l0_a) from within a
批量中有少数几片STM8L101F3的uid多次读出不一致
STM8L051低功耗模式下ADC无法关闭
从STM8S转到STM8L开发时要注意的几个问题