-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问Flash读写会不会有被中断打断的隐患 #141
Comments
如果你写 flash 时候中断是开的,肯定有这个可能 |
嗯,实际应用的时候一般都有中断,这里的信号量估计得用开关中断,或者进入临界区来保护 |
为什么呢?你要在中断里使用 EasyFlash ? |
那倒不是,我的意思在普通的任务中使用EasyFlash,那么EasyFlash在写入数据的时候,会不会被串口接收中断、脉冲捕获中断之类的干扰了?不是在中断服务函数里使用EasyFlash。 |
lock和unlock之间的代码会被别的中断打断吗 |
lock 目的就是为了锁住上下文,如果你中断中不使用 EasyFlash 那就没事的 |
好的,谢谢你的回复和工作成果。准备在GD32+FreeRTOS项目中使用EasyFlash。 |
可以试试 RT-Thread + EasyFlash ,有现成的 demo https://github.com/armink/EasyFlash/tree/master/demo/env/stm32f4xx,还有软件包: https://packages.rt-thread.org/detail.html?package=EasyFlash |
好的 |
当有RTOS的情况下,lock和unlock通过信号量实现,请问会不会存在“flash_write”的时候被中断打断的隐患?
The text was updated successfully, but these errors were encountered: