yabo国际娱乐对话半导体客户支持- SPI da14531 https://support.dialog-semiconductor.com/resource-keywords/spi-da14531 SPI外围 https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/spi-peripheral < div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >你好,< / p > < p >我开发一个定制的董事会DA14531和NXP芯片,通过SPI连接。作为开发环境我使用的是Pro开发板,带有DA14531的女儿。
我拉跳线SPI,为了连接我的目标,驻留在它自己的板环境。
NXP芯片期望一个简单的协议。在读取时,上面的7位是寄存器地址,0位决定读取或写入。
因此,我猜,必须传输2字节的读取,第二个被忽略,但MISO是由NXP芯片驱动的。

我现在被卡在库中。我关闭了项目中的DMA配置参数(删除了定义CFG_SPI_DMA_SUPPORT)并准备了我的'read_register'函数。< / p > < p >图书馆停止的一个无尽的循环在第903行文件spi931.c: < br / > < / p > < pre > <代码> / /等待RX FIFO空(spi_rx_fifo_empty_status_getf () = = SPI_RX_FIFO_IS_EMPTY); < /代码> < / pre > < p >这是我库调用:< br / > < / p > < pre > <代码> unsigned char getRegister (unsigned int reg_address) {unsigned char reg_addressv = reg_address; for(int i=0; i<sizeof(recv_buffer); ++i) { recv_buffer[i] = (unsigned char) 0xaa; } reg_addressv = reg_addressv << 1; reg_addressv |= 0x01; // marker for read trx_buffer[0] = reg_addressv; trx_buffer[1] = 0; // dummy spi_transfer(recv_buffer, trx_buffer, 1, SPI_OP_BLOCKING); return recv_buffer[0]; }

The line of interest is, where spi_transfer() is called.

The SoC initialisation is taken from the spi_flash project, the interface is set to byte transfer.
In fact, I took that spi_flash example as code base and modified it. All initialisation is kept as is - except for removal of DMA support.
I do not handle with interrupts.

What might be wrong ?
Why is the rx fifo empty ?
It should be nonempty, even if there is nothing attached to the SPI port pins, am I wrong?

Thanks for help and hints,
Joachim

Keywords: 
Device: 
2020年7月28日星期二16:14:01 +0000 joachimkr 371136年https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/spi-peripheral#comments