Can anybody explain me what the bcc_TD_handles block of simulink does? The image below is an example of how to read the MC33775A board. What are the constant numbers of the image? What is the process od adquiring the cell voltages? Does it measure the voltages of all the cells or just of the first module? how can I measure different temperatures?
Thank you!
Solved! Go to Solution.
Hello @mgomez,
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.
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.
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.
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.
Hope this helps,
Marius
Hello @mgomez,
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.
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.
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.
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.
Hope this helps,
Marius
Hello @yavuzklcc
Please find the indexes below on additional registers we read inside the example we provide with the MBDT.
TD Handler block allows you to handle the TPL packets sent by the analog front-end and retrieve this kind of information. Basically, the indexes mentioned here contain register information, while the other contains data that is described inside the TPL protocol documents. Please access such documents.
Regards,
Marius
Hello Marius
I've reviewed almost all of the documents. However, I couldn't establish a connection between the register records and the indices. Could you please explain this to me with just one example? If you can clarify why PRMM_PER_PRMTEMP took the 37th index, I believe I can easily find the others. This is really important for me.I couldnt understand that which is the TPL protocol documents.Can you share with me links related to TPL document.
Thanks..
With Best Regards..
Yes thank you!!
Also, I have another question if you could answer me. How can I do an Stateflow to periodically switch the Device Address and each step time to read data from other BCC in a round robin approach is there any example of that?
There is also a subsystem where the faults appear, how can I know what are those faults and what they verify?
Could I add an alarm in freemaster or something?
Hello,
I have moved your post to MDBT community where the support for MDBT is located.
best regards,
Peter