SE050 always NACKS on i2c command

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

SE050 always NACKS on i2c command

ソリューションへジャンプ
5,367件の閲覧回数
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!

ラベル(1)
タグ(4)
1 解決策
5,116件の閲覧回数
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!

元の投稿で解決策を見る

6 返答(返信)
5,116件の閲覧回数
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 件の賞賛
返信
5,116件の閲覧回数
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 件の賞賛
返信
5,116件の閲覧回数
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.
-------------------------------------------------------------------------------

5,117件の閲覧回数
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!

4,012件の閲覧回数
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 件の賞賛
返信
5,116件の閲覧回数
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.
-------------------------------------------------------------------------------