4033 views|4 replies

1366

Posts

6

Resources
The OP
 

[Xianji HPM6750 Review 8] Detailed description of the small twists and turns encountered by SPI peripherals [Copy link]

 

Since the last post about debugging SPI DMA failed, it has been put on hold until now. The official version V0.11.0 has just been released, and this time SPI DMA has been restored.

What's strange is that after porting the official SPI DMA, it has never been successful and the DMA completion interrupt cannot be triggered. I used an analyzer to capture the waveform, but I still couldn't see the timing occur.

So I tried it according to the official example. Sure enough, the official demo can run and send data through DMA. I saw that the official example has assigned values to the command and address registers, so I made a temp address and command and assigned values accordingly. Sure enough, it was really sent out. The data can also be completely matched.

According to previous development experience, if only data needs to be transmitted, the address segment and command segment should be disabled, and there is no need to operate the address and command registers.

But in fact, although the command segment and address segment are disabled, the two registers CMD and ADDR need to be assigned values.

In the official driver, regardless of whether it is prohibited or not, the corresponding registers will be assigned values

Now it can be sent, but when sending large data in packets, the packet size is greater than 512, so the sending fails. I checked the register again. The data length of TRANSCTRL is 9 bits, which means it can only be 512 bits long. This SPI IP is indeed a bit unique. Most of the previous developments were more than 16 bits, which means that only 512 packets can be sent during DMA transmission.

Verify it:

SPI DMA transfer, O3 code optimization, about 45fps

The SPI poll transmission is also optimized in O3 code, which can reach about 41fps

It seems that DMA is not that helpful for SPI transmission, mainly because the maximum size of SPI data register is 512.

Here, for the SPI DMA peripheral using HPM6750, the following two points need to be noted:

1. SPI DMA can transfer up to 512 bytes at a time. If the number exceeds this, it needs to be sub-packetized.

2. When using SPI DMA, you need to assign values to the command and address registers when configuring the send. Any value will do.

Of course, after asking the official, we learned that these problems will be solved at the driver level, and future SDK updates will not expose such problems to user operations.

This post is from Domestic Chip Exchange

Latest reply

Chips are like this, constantly iterating and improving. I hope Xianji's high-performance MCU will get better and better!   Details Published on 2022-10-28 22:46
Personal signature

1084534438 欢迎交流  [加油,一切皆有可能]

 
 

7

Posts

0

Resources
2
 

Compared with the previous version, the performance seems to have improved by 50%

This post is from Domestic Chip Exchange
 
 
 

62

Posts

3

Resources
3
 

OP, what kind of driver IC is this small screen?

This post is from Domestic Chip Exchange

Comments

ST7789V  Details Published on 2022-6-6 10:44
 
 
 

1366

Posts

6

Resources
4
 
xusiwei1236 posted on 2022-6-5 22:13 OP, what is the driver IC of this small screen?

ST7789V

This post is from Domestic Chip Exchange
Personal signature

1084534438 欢迎交流  [加油,一切皆有可能]

 
 
 

115

Posts

0

Resources
5
 

Chips are like this, constantly iterating and improving. I hope Xianji's high-performance MCU will get better and better!

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list