Configuring BCC SL library block to get AIN4-AIN7 measurements on MC33774A, using S32k358 MBDT

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

Configuring BCC SL library block to get AIN4-AIN7 measurements on MC33774A, using S32k358 MBDT

881件の閲覧回数
MReza
Contributor II

Hi everyone,

My current BMS setup uses the RD-K358BMU and MC33774 A. I'm running into an issue where I can't seem to read analog inputs AIN4–AIN7. The bring-up example project I’m using only includes measurements from AIN0–AIN3 on the PRIMARY channel, but I need to access AIN4–AIN7 as well.

From an earlier community post, I understood the structure of TD_HANDLER messages (refer to the table below). However, I’m unsure how to configure them for the extended analog inputs.

MReza_0-1745132110655.png

 

Do CFG0  and CFG1 have any role in enabling or selecting the PRIMARY vs SECONDARY AIN channels?

MReza_1-1745132287400.png

As a fallback, if I can’t figure out the correct TD mapping for AIN3–AIN7 or the proper register access via TD_Handler, my plan is to use the BCC_SL library and directly work with the registers as documented in the MC33774A datasheet. But I am aware that that you only have limited functionality in the SAFETY LIBRARY

If anyone has figured out how to access these AIN channels or can share a working model/config for this setup, I’d really appreciate your input!

@Irina_Costachescu @mariuslucianand @JozefKozon 

 

0 件の賞賛
返信
3 返答(返信)

637件の閲覧回数
mariuslucianand
NXP Employee
NXP Employee

Hello @MReza 

You are right with the attached table. The useful information is set only on the green marked indexes of the TD Handler block.

Now, in the basic reading example we provide, at some point we request both the PRIMARY and SECONDARY Chains of the Periodic measurements types, which means that the TD Handler reception contains all the PRMM_PER registers followed by the SECM_PER registers. I cannot name all of them here due to the policy of accessing the data sheets documents. 

mariuslucianand_1-1749136593953.png

But the PRMM registers should end at the index 48, where the AIN4, AIN5, AIN6, AIN7 shall be at the 51, 52, 53, 54 indexes, on the request above. Of course, this is tightly coupled with the request from the  blocks construction above.

In the blocks help, at the function Mcc_774a_MSR_GetData, there are all registers requested by this function, but of course, they are selected based on the MeasChain and MeasType.

Another important requirement is to enable the AIN registers in the external configuration tools.

mariuslucianand_0-1749135979729.png

To resume this, the TD Handler works based on request - response approach, as you can see in the steps enumerated below:

mariuslucianand_2-1749137168691.png

So each time, the TD needs to be populated with commands, like in this case the Bcc_774a_MSR_GetData for the chains you are interested, followed by a Send Command. When you Decode the TD, the content is filled with the registers returned in relation with the requested registers values, decided in the Populate TD phase, and remain in the TD Handler, until the Clear TD block is called.

 

In the MBDT releases, the SL_Library embedded is the DEMO version, which provides only a limited number of calls, but still can be used to read some registers for a limited number of times, as it is explained and showcased in the k344bmu_774a_sl_read_s32ct example.

Hope this helps,

Marius

 

446件の閲覧回数
MReza
Contributor II

I followed all the recommended steps:

1) After enabling AIN4–AIN7 in S32CT, I attempted to read TD indexes 51–54 using the same TD structure as in the k358bmu_read_s32ct example (which configures the MSR_getData block for both primary and secondary channels). However, this setup did not work.

 

2) I then created a separate TD using the cfg1 handler to isolate either primary or secondary register reads. While I could successfully access primary registers (including voltages and AINx), the same structure failed to read from the secondary registers.

MReza_4-1750335499347.png

 

 

This is the TD structure and start indexes are 2,3,4,5 to read AIN4-AIN7. Am i missing something here?

 

3) This is slightly unrelated, but I noticed in the example image that the "start locations" don’t seem to match the green-highlighted fields or the actual usable data in the TD structure. Specifically, indexes 2, 6, 10, 11, 12, 13, and 17 are used — is there a particular reason for this mismatch?

MReza_3-1750335457230.png

 

 

Hoping you could help me clarify these points.

Reza

 

 

0 件の賞賛
返信

380件の閲覧回数
MReza
Contributor II

hey @mariuslucianand 

hope you could help me out with this issue

0 件の賞賛
返信