Issue with Register Write Operation on MC33774A

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Issue with Register Write Operation on MC33774A

1,238 次查看
nirmal_masilamani
Contributor IV

Hello,

I am trying to communicate with the MC33774A using the SPI interface of the S32K311. The register read operation works as expected, but when I attempt to write data into a register, it is not reflecting. When I read the register again, I get the default value.

Steps followed:

  1. Write data to the register.
  2. NOP (No Operation).
  3. Read the same register.

I have attached my code for your reference. Could you kindly review it and let me know if there is something wrong in the code?

Thank you.

标记 (1)
0 项奖励
回复
2 回复数

1,191 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Nirmal,

Do you have an oscilloscope or a logic analyzer to see what is going on the bus during the register write operation? Double check that you are using the SPI version of the MC33774A and if possible please also share your schematic.

Attached you can find our simple SPI example.

I hope it helps.

BRs, Tomas 

0 项奖励
回复

1,037 次查看
nirmal_masilamani
Contributor IV

Hello @TomasVaverka ,

Thanks for your support. After some trial and error, SPI write also working now.

But when i try to read the volt measurements continuously, able to read it at very first time only. In PRMM_PER_CTRL register, i checked with both AUTO and ONCE ctrl. Steps follows as below.

1. Configure done. (Periodic Measurement)

2. Check PERRDY bit from PRMM_MEAS_STAT.

3.Read the volt data from PRMM_PER_VC0(Success)

4. Again step2 (Here PERRDY bit is not set in both Auto and once mode). (For Once mode, as per data sheet we followed the seq.).

Is there any sequence or configuration or steps did i miss for reading data continuously? Any reference code for cell volt measurement.

nirmal_masilamani_0-1737034083694.png

 

 

标记 (4)
0 项奖励
回复