View: 4520|Reply: 4

[UART] UART DMA not worked with sleep mode.

[复制链接]

10

主题

27

回帖

360

积分

积分
360
Posted on 2024-9-19 03:09:31 | Show all posts |Reading mode 来自 俄罗斯
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
Posted on 2024-9-19 10:35:47 | Show all posts 来自 上海
本帖最后由 TL_LX 于 2024-9-19 10:38 编辑

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

10

主题

27

回帖

360

积分

积分
360
 Author| Posted on 2024-9-19 16:31:01 | Show all posts 来自 俄罗斯
本帖最后由 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
Posted on 2024-9-19 16:47:22 | Show all posts 来自 上海
睡眠唤醒需要配置唤醒源,例如 PAD 唤醒,timer 唤醒,具体唤醒源的设置请参考 PM_Demo

1

主题

25

回帖

26

积分

积分
26
Posted on 2024-9-19 17:33:59 | Show all posts 来自 上海
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

本版积分规则

Follow our WeChat
Privacy Policy|Telink Developer Community

For copyright infringement reports, complaints or suggestions, please email forum@telink-semi.com

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

inThis forumPostBack to top