This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430FR2355:MSP430FR2355

Guru**** 2046040 points
Other Parts Discussed in Thread: MSP-TS430PT48, MSP430FR2355, BQ76940
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1073398/msp430fr2355-msp430fr2355

部件号:MSP430FR2355
“线程”中讨论的其它部件:MSP-TS430PT48BQ76940

你(们)好

我们正在将 MSP-ts430pt48与 MCU MSP430FR2355配合使用。

另一端是 bq76940 EVM。

两个 EVM 使用 i2c 通过外部线进行互连。

 在 MSP-ts430pt48上,它使用 p4.6和 p4.7执行 i2c ping。  

我移植一个样本程序,并在 MSP430FR2355发送的第一个数据上阻止它。

它在 I2CSendBytes()函数行226中保持循环

=========================================================

HWREG16 (基址+ OFS_UCBxCTLW0)|= UCTR + UCTXSTT;

While (!(HWREG16 (基址+ OFS_UCBxIFG)和 UCTXIFG))

=========================================================

我检查了 UCBxIE,它都打开了,所有的寄存器值对我都是有意义的。

不确定为什么标志总是0

请给出建议

谢谢

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
*
* main.c
*
* This module demonstrates operation of CRC with the bq769x0 family
* AFE devices using a MSP430G2553
*
* Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    >P4SEL0 |= BIT6 + BIT7;//将 I2C 引脚分配给 USCI_B0,用于 SCL 的 P1.6和用于 SDA 的 P1.7
    >P4SEL1 |= BIT6 + BIT7;//将 I2C 引脚分配给 USCI_B0,用于 SCL 的 P1.6和用于 SDA 的 P1.7

    要在 P4.6/7上获取 UCB1SDA/SCL,您需要 PSEL=0,即 PSEL1位应为=0 [参考 FR2355数据表(SLASEC4D)表6-66]。

    删除这些行中的第二行。

    -----

    您是否安装了 I2C 上拉装置? [参考 EVM 数据表(SLVU925C)第6.6节]

    如果您的导线非常短,并且您的总线运行速度不是太快(请尝试 BRW=80,而不是 BRW=8),则您可能会成功执行内部抽拉:

    >P4OUT |=(BIT6|BIT7);

    >P4REN |=(BIT6|BIT7);

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    在以下步骤中更改配置

    1>上拉两侧的 I2C

    2>  

    P4SEL0 |= BIT6 + BIT7;//将 I2C 引脚分配给 USCI_B0,用于 SCL 的 P1.6和用于 SDA 的 P1.7
    P4SEL1 = 0;
    P4OUT |= BIT6 + BIT7;
    P4REN |= BIT6 + BIT7;

    当我尝试相同的步骤时,我确实看到 UCTXIFG 设置为1。

    但是,它位于 B0模块中。

    我的设置在 B1模块上。

    这是否合理?如何解决?

    请给出建议

    谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这似乎是不寻常的。 EUSCI_B1_BASE 的值是多少? (应该是0x05C0)[右键单击名称并“转至定义”。]

    其他 UCB0寄存器是否也显示您的设置? 未初始化的 EUSCI_B 具有 UCTXIFG=1 [参考用户指南(SLAU445I)表23-18]。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好,

    有关调试 MSP430的 I2C 问题,请参阅以下资源。

    MSP 学院:I2C 概念

    eUSCI 和 USCI 串行通信常见问题的解决方案

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我认为这个问题甚至与 I2C 无关。

    我们刚刚发现 MSP-ts430pt48 没有晶体。

    我将把这个问题标记为已解决。

    谢谢