mysql basic operation

install mysql service on centos 7

install

1
2
3
4
$ sudo wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
$ sudo md5sum mysql57-community-release-el7-9.noarch.rpm
$ sudo rpm -ivh mysql57-community-release-el7-9.noarch.rpm
$ sudo yum install mysql-server

Read More

STM32F4 MEMOS

emmmmm,虽然说STM32的东西很基本很基本了但是如果不做点记录的话好多坑都会忘记,所以还是弄个踩坑记录吧。

踩的StdPeriphLib的坑

USART_IT_IDLE

USART的中断类型除了RXNE/TXE之外还有一个经常用到的是IDLE,但是st的官方库函数在中断处理函数中处理IDLE时有个bug:进IDLE后,必须要读取SR,DR寄存器后再执行功能代码,不然会一直进IRQHandler(死循环)。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifdef __cplusplus
extern "C"
{
#endif //__cplusplus
void USART2_IRQHandler()
{
uint8_t tsr;
uint8_t tdr;
if(USART_GetITStatus(USART2,USART_IT_IDLE)==SET)
{
tsr=USART2->SR;
tdr=USART2->DR;
//TODO:Meow
USART_ClearFlag(USART2,USART_IT_IDLE);
}
}
#ifdef __cplusplus
}
#endif //__cplusplus

Read More

Hello World

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Read More