S32K344 HVBMS indexes of TD Handler blocks.

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

S32K344 HVBMS indexes of TD Handler blocks.

1,135 Views
yavuzklcc
Contributor III

Hello everyone,

I'm working on developing HVBMS with S32K344. Here, NXP TD Handler blocks have made the job quite easier,but I need to input certain index values into the start location to read voltage and temperature.I somehow manage to read voltages and temperatures. However, I still don't understand which index corresponds to which register address for reading. For example, when I write 37 to the index, I can read the PRMM_PER_PRMTEMP register, which gives me the IC voltage. However, I found this information on the NXP community. Where can I find why this register is 37 and how other register addresses are associated with which indices?

This is a crucial issue for me. -I've used the MPC5775 tool before. When I right-clicked, I could see detailed information when I selected "help." However, I can't see that here. Can you share the full documentation regarding the usage of these blocks with me?

Can I access the C code for MC33775A (driver code)?

With Best regards.

0 Kudos
6 Replies

1,006 Views
yavuzklcc
Contributor III

Hello Jozef

Firstly thanks for your answer.However "You said, 'You could identify the registers and commands that handle the temperatures, and complete the request blocks with the actions that read such temperatures,'
but how can I do this?
For example, if the register I want to read is 186Fh PRMM_PER_AIN0, how do I set which index to send to the TD handler to obtain the information from this register? I'm reading this register when sending 30, but I can't understand why it's 30.Where can I learn which register corresponds to which index? I've examined some source code, but I couldn't find any information about this."

0 Kudos

994 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Yavuz,

I see you have posted the question to the MBDT community. I will ping Marius to answer you there. 

With Best Regards,

Jozef

818 Views
yavuzklcc
Contributor III

Is there any progress?

0 Kudos

776 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Yavuz,

I have checked the community thread, and I see Marius hasn't answered you yet. I have just send him a reminder. Hopefully he will answer you soon. Thank you for your patience.

With Best Regards,

Jozef

929 Views
yavuzklcc
Contributor III

Hello Jozef,

I'm waiting your response.

With best regards.

0 Kudos

1,053 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Yavuz,

for the TD Handler description please refer to this community thread. In case you would not have an access there, please see the answer also here.

DESCRIPTION

Can anybody explain me what the bcc_TD_handles block of simulink does?

The purpose of the bcc_TD_handles blocks is to provide access to the buffers used for the exchanged data between the MCU and the S32K3. Because the TD Hanlder is a complex C structure, we chose to add a dedicated block, to provide access to the TD Handler fields information, so that the contents of the register could be extracted from the TD Handlers while the messages have been transferred. TDs are declared inside the external configuration tools and they are available in Simulink blocks because the MBDT reads the settings from the configuration tools project associated with the Simulink model.

JozefKozon_0-1694503139847.png

 

 What are the constant numbers of the image? What is the process od adquiring the cell voltages?

The numbers in the screenshot you have added in the post represent the address location in the TD Handler BUffer of the responses, where the register's content information for the measurements are stored. So initially, we requested the BCC to do a primary and secondary chain measurement, and we packed this request in a TD_Hanlder, like you can see below, Once done, we call the TD_Send function, to begin the transfer between the S32K3 and the BCC.

JozefKozon_1-1694503139827.png

 

When the exchange is done, we have in the TD handlers, the TPL packets that the BCC has responded with. So basically, we need to identify the location of the registers content in the expected TD handler buffer an retrieve the value, like in the screenshot you have added.

Does it measure the voltages of all the cells or just of the first module?

The current example measures only the voltages from the first module. In order to receive data from all the modules, you have to repeat the process above for the others modules as well, by adjusting the Device Address. You could use Stateflow to periodically switch the Device Address and each step time to read data from other BCC in a round robin approach.

JozefKozon_2-1694503139939.png

 

how can I measure different temperatures?

You could identify the registers and commands that handle the temperatures, and complete the request blocks with the actions that read such temperatures. After the transaction is completed, you have to identify the location in the TD Hanlder and convert from RAW to what units you are interested in.

With Best Regards,

Jozef