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.

[参考译文] BQ40Z50-R1:BQ40Z50-R1 的 SMBus 接口

Guru**** 2770865 points

Other Parts Discussed in Thread: BQ40Z50-R1, EV2400, BQSTUDIO

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

https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1599684/bq40z50-r1-smbus-interface-for-bq40z50-r1

器件型号: BQ40Z50-R1
主题中讨论的其他器件: EV2400BQSTUDIO

尊敬的先生:
 
我们正在尝试使用 ATSAMD21J18A (SAMD21 Xplained Pro Board) 和 SMBus 接口开发电池管理系统 (BMS)。 我们正在将德州仪器 (TI) IC - bq40z50-R1 用于 BMS。
 
我们已在 MPLAB X IDE v6.20 中使用 MCC 将 SERCOM2 配置为 I2C 主器件。 (附加了示例代码)
我们没有获得 bq40z50-r1 的任何响应。 (已连接逻辑探头的屏幕截图)
 
请帮助我们解决问题。
 
此致、
Manan Oza.

// *****************************************************************************
// *****************************************************************************
// Section: Included Files
// *****************************************************************************
// *****************************************************************************

#include <stddef.h>                     // Defines NULL
#include <stdbool.h>                    // Defines true
#include <stdlib.h>                     // Defines EXIT_FAILURE
#include "definitions.h"                // SYS function prototypes


// *****************************************************************************
// *****************************************************************************
// Section: Main Entry Point
// *****************************************************************************
// *****************************************************************************

uint16_t duty = 943U;

uint16_t SMB_Add = 0x0016;      //0x0016
uint8_t BAT_Temp = 0x08;
uint32_t wrLength = 1U, rdLength = 2U;
uint8_t rdData[2] = {0};

int main ( void )
{
    /* Initialize all modules */
    SYS_Initialize ( NULL );

    /* Start Systick Timer for delay function*/
    SYSTICK_TimerStart();
    

    SERCOM2_I2C_WriteRead(SMB_Add, &BAT_Temp, wrLength, rdData, rdLength);
    
    while ( true )
    {
        /* Maintain state machines of all polled MPLAB Harmony modules. */
        SYS_Tasks ( );
//SMBus PA08:SDA, PA09:SCL EXT1, 50kHz        

        SERCOM2_I2C_WriteRead(SMB_Add, &BAT_Temp, wrLength, rdData, rdLength);
        SYSTICK_DelayMs(2000);

    }

    /* Execution should not come here during normal operation */

    return ( EXIT_FAILURE );
}


/*******************************************************************************
 End of File
*/

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

    您好:

    下面是通过 EV2400 的同一事务的屏幕截图。 确保它们匹配。 我可以向您发送私人图像、以便将文件发送给您。

    -米格尔

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

    您好:

    感谢您的快速答复。

    请将图像/文件发送给我、以便我可以更好地匹配。

    我必须更改 tRise 吗?

    我不熟悉 SMBUS、请提供帮助。

    此致、

    Manan

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

    您好、Manan、

    主机是否支持时钟延展?

    器件电源是否正常 (PACK 引脚上的电压> 5V)?

    此致、

    -米格尔

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

    您好、Miguel、

    感谢您的更新。

    SAMD21 支持时钟延展。

    我必须在哪种模式下配置 I2C(主模式或从模式)?

    此致、

    Manan

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

    您是否在谈论您的主机? 它应该是大师。  

    -米格尔

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

    使用 BQstudio 中的以下捕获内容作为参考。  e2e.ti.com/.../bq40z50_5F00_Bqstudio_5F00_AutomaticRefresh.sal