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.

[参考译文] UCD3138A:"PMBus_read_status_bit_mask"用于什么?

Guru**** 2390755 points


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

https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/651233/ucd3138a-what-does-pmbus_read_status_bit_mask-use-for

器件型号:UCD3138A

大家好、TI 人:

"PMBus_Read_STATUS_bit_MASK"的用途是什么? 此命令是 PMBus MFR_SPECIFIC 命令。 我认为它可能用于某些 GUI 调试器用途。 我想知道该命令的确切目的是什么。

有一些用于存储器调试的命令。  下面的函数处理其中一个命令。 我不明白为什么长度应该小于32字节? PMBus_buffer[1]中的值是什么 ?

uint8 PMBus_write_parm_info (空)

 uint8 temp_index;
 int16 temp_offset;  
 uint8 temp_count;   
 uint8 temp_size;  
 uint8 temp_length;  

 temp_index = PMBus_buffer[2];
 temp_offset = PMBus_buffer[3]+(PMBus_buffer[4]<<8);
 temp_count = PMBus_buffer[5];
 temp_size  = PMBus_buffer[6];
 temp_length = temp_count * temp_size;


 //---- 验证传入的参数---

 //---- 验证数据---
 //验证指定的基址是否有效
 // 0 (RAM) 和1 (寄存器)对读取或写入有效。
 // 2 (DFLASH)、3 (pflash_const)和4 (pflash_prog)为只读。
 //如果尝试对它们进行写操作,它们将在 PMBus_write_parm_value()中标记。
  if (temp_index > NUM_MEMORY_Segments) // unsigned。    
  {
   返回 PMBus_INVALID_DATA; //错误:索引无效
  }

  //验证消息是否足够短以适合
 if (temp_length > 32)
  {
   返回 PMBus_INVALID_DATA; //错误:长度大于 SAA 能力。
  }

  //验证大小是否为1、2或4字节
 if ((temp_size!= 1)&&(temp_size!= 2)&&(temp_size!= 4))
  {
   返回 PMBus_INVALID_DATA; //错误:大小无效
  }

期待您的回复

BR

Dana

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

    对于读取状态位屏蔽、我认为这是为了屏蔽不同状态位上的警报。  原始 PMBus 规范没有 SMBALERT_MASK 命令。

    如果您有一个代码、请告诉我它是哪个代码、可能会从读取状态位掩码向我发送一些代码片段、我可以肯定地告诉您。

    parm info 和 parm value 命令用于基于 PMBus 的存储器调试器、该调试器可以在芯片运行时对存储器进行读取和写入。  它可以从字节甚至更长的数据中读取任何内容。