想通过串口tx打印调试信息,但是始终调不通,没用中断,没用rx。示波器观察PA2始终高电平。 代码如下: void SysClkInit(void) { CLK_CKDIVR_bit.CKM = 3; CLK_ICKCR_bit.HSION = 1; CLK_SWR = 1; CLK_PCKENR1_bit.PCKEN15 = 1; //USART1 CLK_PCKENR1_bit.PCKEN10 = 1; //TIM2 CLK_PCKENR2_bit.PCKEN27 = 1; //Boot ROM CLK_PCKENR2_bit.PCKEN20 = 1; //ADC1 } void SysUSART1Init(void) { SYSCFG_RMPCR1_bit.USART1TR_REMAP = 1; //USART1_TX on PA2 and USART1_RX on PA3 PA_DDR_DDR2 = 1; //output PA_ODR_ODR2 = 1; //data PA_CR1_C12 = 1; //push pull PA_CR2_C22 = 1; //10M USART1_CR1_bit.M = 0; //1 start bit, 8 data bits, n stop bit USART1_CR3_bit.STOP0 = 0; USART1_CR3_bit.STOP1 = 0; //1 stop bit USART1_CR1_bit.PCEN = 0; //parity disable USART1_BRR2 = 0x00; //9600 USART1_BRR1 = 0x0D; USART1_CR2_bit.TEN = 1; //transmitter enable USART1_CR1_bit.USARTD = 0; //usart enable } void UsartTxAByte(unsigned char ucData) { USART1_DR = ucData; while (0 == USART1_SR_bit.TXE); } |
stm8l051f3 TSSOP20 封装,待机模式下,2天后,电流突然增加到140UA
stm8l050j3
STM8L的LCD调试时不亮
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无法关闭
串口使能不应该是等于1吗 还是通过其他程序进行使能了??
评分
查看全部评分