当前位置:网站首页>Exploration of 6-wire SPI transmission mode
Exploration of 6-wire SPI transmission mode
2022-07-25 16:01:00 【Wang erche】
Hardware environment
4G modular :FIBOCOM_AL940, be based on MDM9628 CordX-A7 1.3 GHz Single core ,RAM 70M ROM 150M, Contains two groups spi Interface , Only the main equipment , The biggest support 50M Clock speed ;
MCU Single chip microcomputer :RH850/F1K, Contains two groups spi Interface , Support master-slave mode ; Maximum support from mode 5M Clock speed ;
4G Module dominated mode , Single chip microcomputer as slave device ,4 Line spi Add 2 Synchronization line ,master_ready Output ,slave_ready Input ;
Host timing
From the machine through s_r From low to high level changes, the host is notified to send a clock signal , Both parties negotiate the number of clocks 4K data , The host changes m_r The status notification starts from the machine clock signal :

Commissioning process
Red thread s_r Pin , After the rising edge triggers an interrupt , The clock signal didn't come out , But when the falling edge comes out , At this time, the MCU sends a byte of data :

After sending a byte of data, you don't continue to send data , This is very unusual .
Check the SCM 6 Line spi The mode instruction manual is as follows ,CSIHTRYO Pin as output , Low level busy state , High level transceiver data status , So the rising edge triggers 4G The module sends a clock signal :



But from the waveform diagram 4G The module does not send the clock according to the rising edge , Instead, the falling edge sends the clock , So it needs to be modified spi Drive to adapt to the timing requirements of MCU .
see 4G Modular spi The driving is that the rising edge triggers an interrupt to send and receive data , How can the modified drive be triggered by the falling edge , There was no doubt or confirmation at that time, which led to the problem .
gpio_direction_input(fibo_spidev->gpio_slave_ready); //SPI_SRDY has external pull-up
status = request_irq(gpio_to_irq(fibo_spidev->gpio_slave_ready), spidev_slave_ready_irq_handler,
IRQF_TRIGGER_RISING | IRQF_DISABLED, "ql-spi", fibo_spidev);
if (status) {
printk("Fail to request gpio_slave_ready IRQ\n");
} else {
fibo_spidev->irq_slave_ready = gpio_to_irq(fibo_spidev->gpio_slave_ready);
disable_irq(fibo_spidev->irq_slave_ready);
}
}Problem solving
4G modular spi The drive is modified to trigger the sending of clock signal to start data transmission and reception on the rising edge ,6 The line function is normal , but m_r Pins are not used , SCM can send and receive normally without managing this state , At present, there is no probability of packet loss in one night of testing .
边栏推荐
- Is there only one lib under JDBC in Seata?
- 用GaussDB(for Redis)存画像,推荐业务轻松降本60%
- Beyond compare 4 realizes class file comparison [latest]
- MySQL - Summary of common SQL statements
- Redis distributed lock, it's really impossible without it
- 乐观锁悲观锁适用场景
- leetcode:528. 按权重随机选择【普通随机失效 + 要用前缀和二分】
- CVPR 2022 | in depth study of batch normalized estimation offset in network
- Why is preparestatement better and safer?
- Basic usage of MFC thread afxbeginthread, passing multiple parameters
猜你喜欢

推荐系统-协同过滤在Spark中的实现

General test case writing specification

Why is preparestatement better and safer?

Okaleido上线聚变Mining模式,OKA通证当下产出的唯一方式

Equivalent change of resistance circuit (Ⅱ)

Implementation of recommendation system collaborative filtering in spark

面试突击:为什么 TCP 需要 3 次握手?

MATLAB optimization tool manopt installation

Redis distributed lock, it's really impossible without it

HDD Hangzhou station · harmonyos technical experts share the features of Huawei deveco studio
随机推荐
MySQL 悲观锁
Data system partition design - partition rebalancing
I interviewed 8 companies and got 5 offers in a week. Share my experience
Leetcode - 232 realize queue with stack (design double stack to realize queue)
Leetcode - 380 o (1) time to insert, delete and get random elements (design hash table + array)
Gap Locks(间隙锁)
Leetcode - 622 design cycle queue (Design)
JWT diagram
July 25th, 2022 Daily: Microsoft proposed CodeT: a new SOTA for code generation, with 20 points of performance improvement
Zhaoqi Kechuang high-quality overseas returnee talent entrepreneurship and innovation service platform, online live broadcast Roadshow
Understanding of this object
Huawei 2023 starts to warm up in advance! Zuo Shen's program code interview guide comes in handy
阿唐的小帮手
MySQL乐观锁
活动回顾|7月6日安远AI x 机器之心系列讲座第2期|麻省理工教授Max Tegmark分享「人类与AI的共生演化 」
Ice 100g network card fragment message hash problem
排他锁(EXclusive Lock)
How to disable hosting when Flink SQL in flink-1.13.6 runs in yarn session mode
产品动态丨Android 13 高效适配全新升级
Is there only one lib under JDBC in Seata?