SE050 always NACKS on i2c command

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

SE050 always NACKS on i2c command

Jump to solution
3,256 Views
badhri_radhakri
Contributor II

Hi Good day, I'm using SE050 as a I2C slave to my I2C Master STM32 board. Every time when i try to initiate a Soft Reset Request, I always get a nack. 

#define SLAVE_ADDR 0x48<<1

uint8_t packet[5] = {  //for soft reset request
            0x5A,             // NAD
            0xCF,             // PCB for reset
            0x00,            // LEN is 0 no INF
            0x37,            // CRC 1
            0x7F             // CRC 2
};   

while (ret = (HAL_I2C_Master_Transmit(&hi2c1, SLAVE_ADDR, packet, sizeof(packet), 100)) != HAL_OK);
HAL_Delay(50);

/* code */

Please help me with if I'm sending the wrong values. The packet values are calculated as per the I2C specs datasheet. As for the CRC I'm using the SE050 Plug Trust's library function.

Thanks!

Labels (1)
Tags (4)
1 Solution
3,005 Views
badhri_radhakri
Contributor II

Thank you. The problem was with the ENA pin on the board. I wasn't paying attention to it's Jumper positions. Now I'm able to make the chip respond to my commands.

Thanks!

View solution in original post

6 Replies
3,005 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi,

Actually I could not find any obvious wrong in the packet values, maybe you can use some logical analyzer to probe the I2C frame, and check if it meets the spec as below:

pastedImage_1.png

Please kindly refer to https://www.nxp.com/docs/en/user-guide/UM11225.pdf  for more details.

Hope that helps,

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
3,005 Views
badhri_radhakri
Contributor II

Hi Kan_Li‌ thanks, I hooked up a logic analyzer and this is how my waveform looks like:
pastedImage_1.png

There is always a NACK after writing the Slave address which in this case is 0x48<<1. 

Could there be any other mistake I'm making ? :smileysad:

Thanks!

0 Kudos
3,005 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Are you using the SE050ARD board? are the jumpers set correctly? Please refer to https://www.nxp.com/docs/en/application-note/AN12395-OM-SE050ARD_hardware_overview.pdf  for details.

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

3,006 Views
badhri_radhakri
Contributor II

Thank you. The problem was with the ENA pin on the board. I wasn't paying attention to it's Jumper positions. Now I'm able to make the chip respond to my commands.

Thanks!

1,901 Views
Exocet
Contributor II

Hello,

 

Can you share the STM32 porting files ?

I will soon start the port and I need a reference to start with.

Many thanks

0 Kudos
3,005 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Great to know this issue has been fixed on your side. Thanks for the update!

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------