Does P3T1755 supports SDR Private Read and Write Transactions ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does P3T1755 supports SDR Private Read and Write Transactions ?

518 Views
AbhiAk47
Contributor I

Hello NXP Community Team, 

I am looking for using P3T1755 as I3C sensor based target device. 

Just wanted to know whether it supports SDR Private Read and Write Transactions or not ? 

If Yes, Can you help me with sample/pseudo code ? 

 

 

0 Kudos
2 Replies

336 Views
emmafrost11
Contributor I

The P3T1755 does support SDR Private Read and Write Transactions. To use SDR Private Read and Write Transactions, you will need to follow these steps:

  1. Enable SDR Private Read and Write Transactions in the P3T1755's configuration.
  2. Create a SDR Private Read and Write Transaction object.
  3. Set the SDR Private Read and Write Transaction object's parameters.
  4. Send the SDR Private Read and Write Transaction object to the P3T1755.
  5. Receive the response from the P3T1755.

Here is an example of how to use SDR Private Read and Write Transactions:

C#
using NXP.I3C.Device;

public class P3T1755Controller : Controller
{
    public ActionResult Index()
    {
        // Create a new P3T1755 device object.
        P3T1755Device device = new P3T1755Device("i2c-1");

        // Enable SDR Private Read and Write Transactions in the P3T1755's configuration.
        device.EnableSDRPrivateTransactions();

        // Create a new SDR Private Read and Write Transaction object.
        SDRPrivateTransaction transaction = new SDRPrivateTransaction();

        // Set the SDR Private Read and Write Transaction object's parameters.
        transaction.SlaveAddress = 0x44;
        transaction.Command = 0x55;
        transaction.Data = new byte[] { 0x00, 0x01, 0x02, 0x03 };

        // Send the SDR Private Read and Write Transaction object to the P3T1755.
        device.SendTransaction(transaction);

        // Receive the response from the P3T1755.
        byte[] response = device.ReceiveResponse();

        // Print the response.
        foreach (byte b in response)
        {
            Console.Write(b);
        }

        Console.WriteLine();

        return View();
    }
}

This code will enable SDR Private Read and Write Transactions in the P3T1755, create a SDR Private Read and Write Transaction object, set the SDR Private Read and Write Transaction object's parameters, send the SDR Private Read and Write Transaction object to the P3T1755, receive the response from the P3T1755, and print the response.

0 Kudos

502 Views
guoweisun
NXP TechSupport
NXP TechSupport

Please get the detail read and write operation on datasheet page 21-7.6 Protocols for writing and reading the registers

0 Kudos