S32K344 with MC33775A (I can not read all bcc values.)

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

S32K344 with MC33775A (I can not read all bcc values.)

Jump to solution
4,376 Views
yavuzklcc
Contributor III

Hello everyone,

I want to communicate with my S32K344.MC33775A development board and read voltage values from my emulator using the "hvbmu2_775a_read_s32ct" example from the toolbox. Initially, the example was prepared to read from a single device. Similarly, when I set the device address to 2, the numnodes value to 2, and added an extra block, I was able to read voltage values from the second device. However, when I try the same steps for the third and fourth devices, I am unable to read voltage values. I always set the chain address to 1 and only change the device address. What could be the issue?

Best regards.

0 Kudos
1 Solution
2,902 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

if you have only one batt-14cemulator for all channels, then the Modul voltages will be the same. The software engineer has tested two batt-14cemulators. One for one channel and the other one for the other three channels. The fourth channel is showing 40V, different than the other three 53.5V.

JozefKozon_0-1692618277265.png

With Best Regards,

Jozef

 

View solution in original post

0 Kudos
36 Replies
2,721 Views
yavuzklcc
Contributor III

Hi Jozef

Is there any progress ? i still wait your software.

0 Kudos
2,718 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

unfortunately no. The software engineer still hasn't sent me the example. I am sorry.

With Best Regards,

Jozef

0 Kudos
2,571 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

I am terribly sorry. There is still no answer from the software engineer. I have just sent him a reminder and learned, that he is OOO (Out Of Office) till 31st of July. On the first of August I will send him another reminder. I apologize for this. 

JozefKozon_0-1690435454293.png

With Best Regards,

Jozef

0 Kudos
2,510 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

I have sent the software engineer another reminder. I am sorry, but there is still no answer from him. I will keep pushing for the software example.

With Best Regards,

Jozef

0 Kudos
2,490 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

please see below an answer from the software engineer I have just received.

DESCRIPTION

I am sorry for the delay! I have reproduced the use case on my side and it seems to be something related to the configuration of the external S32CT. I will keep you updated on the status. I am aiming to deliver to you the model this week.

With Best Regards,

Jozef

0 Kudos
2,334 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

I am embarrassed to write you again the same answer. Unfortunately there is still no answer from the application engineer. I apologize for that. I will send him another reminder.

With Best Regards,

Jozef

0 Kudos
2,295 Views
yavuzklcc
Contributor III

Hello Jozef

First of all, thank you for your interest. However, this is a really important and urgent issue for me. So the faster it is, the better for me. I look forward to your reply.

Best Regards...

0 Kudos
2,115 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Yavuz,

I have just received an update from the software engineer. He is still working on the MATLAB example. Unfortunately he still doesn't have it ready. I apologize for inconvenience. As soon as he will send me another update, I will definitely reply to you.

With Best Regards,

Jozef

0 Kudos
2,027 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

good news. Finally the software engineer has provided the MATLAB example. Please find it attached. Please also see his answer below.

 

DESCRIPTION

I am sorry for my delayed response!

 

I was able to put together an example to read 4 battery cell controllers. Regarding the customer’s answer, because the MBDT uses the S32 Configuration Tools to generate the MCU peripherals configuration,  it is a mix of what the customer assumed, meaning that both in S32CT need to specify the 4 BCC connected on the MC33665A and also the model needs to enumerate the devices, and then to address each of them. IN the next few bullets I will explain the settings, and also the steps.

 

  1. Specify the BCC devices number connected inside the S32CT

As it may be seen inside the settings below, the customer needs to specify the NumberOfConnectedBCCDevices to be 4 for the setup mentioned in the request, because we have 4 MC33775A connected.

JozefKozon_0-1692591836260.png

 

  1. Adjusting the initialization sequence

Inside the model, there is an initialize function which is executed once at the beginning of the code execution. This function wakes up the battery pack, enumerates the devices ( this means that it assigns to each of them a Device ID, and also enables the measurements for each of the BCC devices. Now, I had to redesign this function in order to address all the BCCs and I have used some While Loops constructions in order to iterate through all the devices. So this was a required additional step in order to make sure that all the BCCs are enumerated and ready to be independently addressed by the CMU.

JozefKozon_1-1692591836329.png

 

  1. Starting conversions

The main model also got changed in the way that for the Device Address now this uses a Stateflow Chard in order to iterate through the device addresses. We got the step time lower at 0.025 seconds, so each 25ms the CMU requests data from each of the BCC in a round robin circle.

JozefKozon_2-1692591836504.png

 

The same StateFlow BCC ID is then passed to the second subsystem which places the measurement to the right location inside the Pack_Voltage data store memory.

JozefKozon_3-1692591836624.png

 

  1. Testing

To test the model, I have connected a dedicated emulator for the BCC with the ID4 and checked the last one in the chain with different inputs.

 

JozefKozon_4-1692591841208.png

I have checked the values using the FreeMASTER. Now BCC1 2 and 3 are connected to one emulator, while BCC 4 is connected to the other emulator.

Cell_Voltages [13], [27], and [41] are the 14th cell of the BCC 1 2 and 3 and they have the same value as 2.986 as might be seen below.

The Cell_Voltages[55] is the 14th cell of the BCC number 4 connected to the second emulator, and it might be seen, this has the 4.1 Volts.

 

The difference might also be seen in the Module_Voltage, because the Module_Voltage[0] [1] [3] has 53.5 Volts, while the last one has 40 Volts.

JozefKozon_5-1692591841243.png

To this e-mail, I have attached an archive, containing the model, mex of the S32CT configuration file, the generated .elf file and some additional files required by the Simulink model.

JozefKozon_6-1692591841258.png

 

With Best Regards,

Jozef

2,011 Views
yavuzklcc
Contributor III

I successfully uploaded the software you provided and examined the results. However, I'm facing an issue. Module_Voltage0 is showing readings from the first device correctly. Module_Voltage1 is also displaying accurate readings. However, Module_Voltage2 and Module_Voltage3 are both showing the same values as Module_Voltage1. In fact, even when I disconnect the power supply of the 3rd and 4th devices, Module_Voltage2 continues to display the same value it had before. I haven't made any changes to the software; could this be a hardware problem ? How can I determine if this is indeed a hardware issue ?

0 Kudos
2,903 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

if you have only one batt-14cemulator for all channels, then the Modul voltages will be the same. The software engineer has tested two batt-14cemulators. One for one channel and the other one for the other three channels. The fourth channel is showing 40V, different than the other three 53.5V.

JozefKozon_0-1692618277265.png

With Best Regards,

Jozef

 

0 Kudos
1,993 Views
yavuzklcc
Contributor III

Hi Jozef

What I'm trying to explain is that even when I disconnect the cables of the 3rd and 4th devices, the 2nd device continues to write data. So, it seems like the 3rd and 4th devices are still operational, but I'm actually reading the data from the 2nd one. For example, in the image you provided, there are slight voltage differences among the module voltages. However, I am consistently seeing the same data.

With Best Regards...

0 Kudos
1,957 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

could you please test to disconnect the BATT14-CEMULATOR from three BCCs and keep only one connected? For example first disconnect the 2nd, 3rd and 4th connector and keep connected only the 1st connector. Next, please disconnect 1st, 3rd and 4th connector and keep connected only the 2nd connector. Next please keep connected only the 3rd connector and next only the 4th connector. Do you see the module voltages every time? Or only for example with the 1st connector connected. I would like to check which channel is operational. 

With Best Regards,

Jozef

1,946 Views
yavuzklcc
Contributor III

Hello Jozef,

Thank you very much for your interest. I was able to display different voltage values as I wanted, thanks to you. Now I'm attempting to read the temperature. From what I gather from the community, it seems that I need to define the records and commands within the TD Handler that process temperature data. How can I locate these records? Do you have an example for this by any chance?

I'm very grateful for your assistance.

With best regards...

0 Kudos
1,922 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hi Yavuz,

great, I am glad that you have solver the module voltages issue. Thank you for letting me know. Please clarify, which temperature you want to read. Internal IC temperature?

JozefKozon_1-1692767529593.png

Or external temperature via the NTC resistors to GPIO pins? 

JozefKozon_0-1692767500618.png

JozefKozon_2-1692767583350.png

With Best Regards,

Jozef

 

 

1,916 Views
yavuzklcc
Contributor III

Hi Jozef

Actually, I need to read both.I would be glad if you help.

With best regards...

 

0 Kudos
1,713 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Yavuz,

please see below an answer from the software engineer.

DESCRIPTION

As a guideline, we can suggest the customer do the following:

 

  1. To enable the GPIO measurements for the analog inputs I think first this must be specified inside the MC33775 Component of the S32 Configuration Tools as in the image below:

 

JozefKozon_0-1693543055961.png

 

  1. Both the primary chain and the secondary chain are converted in the MBDT example so in order to get internal temperature and the AIN results customer needs to retrieve from the correct location index these values, using the TD Handler block.

 

Inside the model, we could see here below, where the CHAINS GetData blocks are used. Now they are returning the requested registers inside the TD Handler.

JozefKozon_1-1693543056096.png

 

So inside the If action subsystem we are extracting at index 25 the voltage of the cell 14 and the pack voltage, as it could be seen below.

 

JozefKozon_2-1693543056139.png

 

So in order to extract the internal temperature and the voltages from the GPIOs the following indexes needs to be extracted.

  • index 37, register 1873h PRMM_PER_PRMTEMP
  • index 58, register 1c73h SECM_PER_SECTEMP
  • index 30, register 186Fh PRMM_PER_AIN0
  • index 31, register 1870h PRMM_PER_AIN1
  • index 32, register 1871h PRMM_PER_AIN2
  • index 33, register 1872h PRMM_PER_AIN3
  • index 51, register 1C6Fh SECM_PER_AIN4
  • index 52, register 1C70h SECM_PER_AIN5
  • index 53, register 1C71h SECM_PER_AIN6
  • index 54, register 1C72h SECM_PER_AIN7

With Best Regards,

Jozef

1,691 Views
yavuzklcc
Contributor III

Hello Joseph,

First of all, thank you for your valuable response. I'll try what you suggested. However, I had some question marks in my mind about how to use these registers. Where can I access the directory records of the TD Handler? Is there a method or a PDF document to find out which register to use and what value to provide as the Start Location?

Thank you.

With Best Regards

1,269 Views
yavuzklcc
Contributor III
Is there any progress?
0 Kudos
2,898 Views
yavuzklcc
Contributor III

Hello Jozef

I use Matlab2022b.Nxp toolbox version is s32k3xx 1.3.0.

With Best Regards.