Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
QSPI
nuc980
NK-980IOT测评之qspi
发布于 2022-03-16 22:42:59 浏览:1253
订阅该版
QSPI: QSPI 是 Queued SPI 的简写,是 Motorola 公司推出的 SPI 接口的扩展,比 SPI 应用更加广泛。在 SPI 协议的基础上,Motorola 公司对其功能进行了增强,增加了队列传输机制,推出了队列串行外围接口协议(即 QSPI 协议)。使用该接口,用户可以一次性传输包含多达 16 个 8 位或 16 位数据的传输队列。一旦传输启动,直到传输结束,都不需要 CPU 干预,极大的提高了传输效率。与 SPI 相比,QSPI 的最大结构特点是以 80 字节的 RAM 代替了 SPI 的发送和接收数据寄存器。 #功能模块的硬件介绍 NK-980Iot qspi使用qspi0驱动flash,flash型号W25N01GVZE1G  涉及到引脚  ##官方手册介绍 >Overview The Quad Serial Peripheral Interface (QSPI) applies to synchronous serial data communication and allows full duplex transfer. Devices communicate in Master/Slave mode with the 4-wire bi-direction interface. The chip contains one QSPI controller performing a serial-to-parallel conversion on data received from a peripheral device, and a parallel-to-serial conversion on data transmitted to a peripheral device. The QSPI controller supports 2-bit Transfer mode to perform full-duplex 2-bit data transfer and also supports Dual and Quad I/O Transfer mode and the controller supports the PDMA function to access the data buffer. ##功能模块的使用说明 ###硬件环境:  NU980Iot开发板 两根usb数据线 ###软件环境: RT-Thread Studio NuWriter Putty #外设性能指标测试 ##目标 对板载flash进行操作 ##创建工程 File->New->RT-Thread Project 选择Base On Board  ##编写代码 创建crypto.c 文档 编写代码 ``` #include
#include
#define DEVICE_NAME "qspi01" static void qspi_sample(int argc, char *argv[]) { struct rt_qspi_device *qspi_dev; char name[RT_NAME_MAX]; rt_uint8_t w25n_read_id = 0x9f; rt_uint8_t id[5] = {0}; if (argc == 2) { rt_strncpy(name, argv[1], RT_NAME_MAX); } else { rt_strncpy(name,DEVICE_NAME, RT_NAME_MAX); } qspi_dev = (struct rt_qspi_device *)rt_device_find(name); if (!qspi_dev) { rt_kprintf("qspi sample run failed! can't find %s device!\n", name); } else { rt_qspi_send_then_recv(qspi_dev, &w25n_read_id, 1, id, 5); rt_kprintf("read w25n ID is:%x %x %x %x\n", id[0],id[1],id[2], id[3]); } } MSH_CMD_EXPORT(qspi_sample, qspi sample); MSH_CMD_EXPORT(aes_sample, aes sample); ``` ##编译烧写 编译代码  打开终端Putty 设置com,115200 复位nu980  烧写代码到内存   查找芯片手册  经过对比读取的id和手册一致。 其实新唐已经把qspi驱动flash代码做的很完成,我已经省去不少工作,比如:  #可编译下载的代码gitee地址 [gitee地址](https://gitee.com/want_to_be_a_vassal/nu980-iot_crypto_qspi_ili9341lcd_test) #心得体会 根据rtthread网站说明文档编写或者修改代码还是比较容易的。 #遇到的问题 使用下载程序到内存中发生错误,这问题还比较棘手,后续看是能找到问题所在。 
0
条评论
默认排序
按发布时间排序
登录
注册新账号
关于作者
想当诸侯的小蚂蚁
这家伙很懒,什么也没写!
文章
7
回答
5
被采纳
0
关注TA
发私信
相关文章
1
stm32外接QSPI-Flash运行程序,还能用FAL进行分区,读,写操作吗?
2
使用sfud擦除w25q64部分区域失败
3
qspi flash部分sector擦除问题
4
超出ROM范围,怎么使用外部CODE FLASH
5
关于H743的bootloader的问题
6
STM32H750下载代码至QSPI FLASH后初始化失败
7
QSPI FLASH W25Q64,在进入映射模式后,如何退出?
8
使用sf bench yes 后 读qspi的flash出错
9
STM32H7使用QSPI的DMA时drv_qspi.c报错
10
w25q256jv 写使能失败,qspi模式下
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
UART
ESP8266
cubemx
WIZnet_W5500
ota在线升级
PWM
BSP
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
keil_MDK
ulog
SFUD
msh
C++_cpp
MicroPython
本月问答贡献
RTT_逍遥
10
个答案
3
次被采纳
xiaorui
3
个答案
2
次被采纳
winfeng
2
个答案
2
次被采纳
三世执戟
8
个答案
1
次被采纳
KunYi
8
个答案
1
次被采纳
本月文章贡献
catcatbing
3
篇文章
5
次点赞
lizimu
2
篇文章
9
次点赞
swet123
1
篇文章
4
次点赞
Days
1
篇文章
4
次点赞
YZRD
1
篇文章
2
次点赞
回到
顶部
发布
问题
投诉
建议
回到
底部