Start SE050 with S32K148 via I2C

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Start SE050 with S32K148 via I2C

1,815件の閲覧回数
saireddy_saredd
Contributor III

Hallo

I want read and write data to SE050 via I2C with S32K148. But, I did not see any registers address of SE050. 

How can I start communication SE050 with S32K148??

Best Regards,

Saidhi reddy Sareddy

@Kan_Li 

0 件の賞賛
返信
3 返答(返信)

1,806件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @saireddy_saredd,

Please use the SDK drivers either in S32DS 2.2 or S32DS 3.4.

There is this lpi2c_master_s32k148 example

danielmartynek_0-1625143857790.png

For example, In S32DS 2.2, set the address of SE050 in Process Expert Component Inspector.

danielmartynek_1-1625144066604.png

 

Regards,

Daniel

 

 

 

1,800件の閲覧回数
saireddy_saredd
Contributor III

Hallo Daniel,

 

Thank you very much for the configuration

I did configuration and send the first packet like below

 

 

const lpi2c_master_user_config_t lpi2c1_MasterConfig0 = {
  .slaveAddress = 72U,
  .is10bitAddr = false,
  .operatingMode = LPI2C_FAST_MODE,
  .baudRate = 400000U,
  .transferType = LPI2C_USING_INTERRUPTS,
  .dmaChannel = 0U,
  .masterCallback = NULL,
  .callbackParam = NULL,
};
     /* Allocate memory for the LPI2C driver state structure */
    lpi2c_master_state_t lpi2c1MasterState;
    


	 /* Initialize LPI2C Master configuration
     *  - Slave address 0x48
     *  - Fast operating mode, 400 KHz SCL frequency
     *  - See LPI2C components for configuration details
     */
    LPI2C_DRV_MasterInit(INST_LPI2C1, &lpi2c1_MasterConfig0, &lpi2c1MasterState);
    Enable_Crypto();
     uint32_t bytesRem;
     status_t txStatus;
    
#if 1
	uint8_t reset_packet[5] = {  //for soft reset request
								0x5A,             // NAD
								0xCF,             // PCB for reset
								0x00,            // LEN is 0 no INF
								0x37,            // CRC 1
								0x7F             // CRC 2
								};
	LPI2C_DRV_MasterSendData(INST_LPI2C1,reset_packet,sizeof(reset_packet),true);
	OS_Delay(100); // waited 300msec
	txStatus = LPI2C_DRV_MasterGetTransferStatus(INST_LPI2C1,&bytesRem);
    if(txStatus != STATUS_SUCCESS)
    {
		printf("******* I2C Data sent failed %d %d*****\n", txStatus, bytesRem );        
	}
    else
    {
		printf("####### Data sent succesfully #######\n");
	}

 

 

 

I am able to send the data and hopefully it soft resets the SE050.
Now I want to read data(version) from SE050 so, please help me here what payload should I send??

 

can I also send immediately another send request with this data

 uint8_t versionPacket[] = { 0x5A, // NAD
0x20, // PCB
0x05, // LEN
0x80, // CLA
0x04, // INS
0x00, // P1
0x20, // P2
//0x00, // Lc
0x09, // Le
0x66, // CRC1
0xAA //CRC2
};  

Best Regards,

Sai

 

@danielmartynek @Kan_Li 

0 件の賞賛
返信

1,787件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Sai,

I would recommend using a logic analyzer to verify the signal on the bus.

Unfortunately, I'm not familiar with SE050.

Can you please post it here:

https://community.nxp.com/t5/Secure-Authentication/bd-p/secure-authentication

 

Thanks,

BR, Daniel

 

 

 

0 件の賞賛
返信