|
查看: 4068|回复: 4

[UART] UART DMA not worked with sleep mode.

[复制链接]

10

主题

27

回帖

358

积分

流光翡翠

积分
358
发表于 2024-9-19 03:09:31 | 显示全部楼层 |阅读模式 来自 俄罗斯
Information
说明:   建议参照本版块置顶帖内容输入必要信息
芯片型号: TLSR8258
驱动SDK版本: zigbee
Hello.


I use UART with DMA - two MCUs exchange data at a speed of 19200. It is Ok.

I want to use sleep mode. But I used sleep mode, UART not worked.


Help me, please.

0

主题

38

回帖

156

积分

荣耀黄金

积分
156
发表于 2024-9-19 10:35:47 | 显示全部楼层 来自 上海
本帖最后由 TL_LX 于 2024-9-19 10:38 编辑

您好,睡眠唤醒之后需要重新配置接收或者发送 DMA,流程如下
  1、 disable 上一笔 DMA
  2、配置下一笔 DMA

10

主题

27

回帖

358

积分

流光翡翠

积分
358
 楼主| 发表于 2024-9-19 16:31:01 | 显示全部楼层 来自 俄罗斯
本帖最后由 Slacky 于 2024-9-19 16:32 编辑

Hello.

I configure the uart every time after sleep.

  1. void user_init(bool isRetention) {

  2. #if PA_ENABLE
  3.     rf_paInit(PA_TX, PA_RX);
  4. #endif

  5. #if PM_ENABLE
  6.     app_wakeupPinConfig();
  7. #endif

  8.     app_uart_init();
复制代码

  1. void app_uart_init() {

  2.     flush_ring_buff();
  3.     drv_uart_pin_set(GPIO_UART_TX, GPIO_UART_RX);

  4.     drv_uart_init(BAUDRATE_UART, (uint8_t*)&rec_buff, sizeof(uart_data_t), app_uartRecvCb);

  5. }
复制代码


The problem is that the chip does not wake up when data appears on the RX.

0

主题

38

回帖

156

积分

荣耀黄金

积分
156
发表于 2024-9-19 16:47:22 | 显示全部楼层 来自 上海
睡眠唤醒需要配置唤醒源,例如 PAD 唤醒,timer 唤醒,具体唤醒源的设置请参考 PM_Demo

1

主题

25

回帖

26

积分

英勇黄铜

积分
26
发表于 2024-9-19 17:33:59 | 显示全部楼层 来自 上海
Slacky 发表于 2024-9-19 16:31
Hello.

I configure the uart every time after sleep.

Hello, the wake source does not have uart at the moment. Try using GPIO to wake up. For example, RX is high when idle, and will be low when sending the start bit, so you can try to use the low level or falling edge of RX as the wake source

本版积分规则

关注公众号
隐私政策|Telink forum

相关侵权、举报、投诉及建议等,请发 E-mail:forum@telink-semi.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|沪ICP备17008231号-1 |沪公网安备31011502403548号

在本版发帖返回顶部