MBDT: ADC's 'setupresultbuffer' block

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

MBDT: ADC's 'setupresultbuffer' block

1,348件の閲覧回数
avinashstarkenn
Contributor III

Hello,

I am using MBDT for S32k3xx EVB.

What is exact functionality of ADC's 'setup result buffer' block?

I need to know following points about that-

1. What type of data it need and its data type? Please give an example. 

2.Is it a address ?

3.How to give that data using data memory read? 

 

avinashstarkenn_0-1692355548938.png

 

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

1,319件の閲覧回数
georgevictor
NXP Employee
NXP Employee

Hi,

A quick introduction about the MBDT workflow for S32K3xx:

 

The MBDT for S32K3xx generates code based on RTD (Real Time Drivers) MCAL components.

 To learn more about how to use and configure these components, open the block help from the block mask and look in the Function section for your desired function:

georgevictor_0-1692369754504.png

 

 

There you can find information about the block's inputs and outputs. In addition, the Code Generation section of the block help contains a link to the component's RTD User Manual and, in some cases, a link to the AUTOSAR Specification if the component is AUTOSAR compliant. These documents contain information about the C functions that our toolbox blocks implement.

Based on the RTD or AUTOSAR function specifications, you need to select the appropriate data type. You can check in our examples how to declare a data store memory like Adc0Group0_ResultBuffer. Double click on a data store memory and take a look in the Signal Attributes section.

georgevictor_1-1692369754587.png

 

 

 

In the RTD or AUTOSAR documentation, the Adc_SetupResultBuffer function requires a pointer  with the address of the result data buffer. When you connect the data store memory to the Adc_SetupResultBuffer block, the address of the data store is automatically computed by our block and used in the generated code.

 

Hope this helps you.

 

Cheers,

Victor

 

0 件の賞賛
返信

1,284件の閲覧回数
avinashstarkenn
Contributor III
Can you please explain with an example? Can we view that data on Simulink after flashing or are you talking about address of microcontroller ?
0 件の賞賛
返信

1,259件の閲覧回数
georgevictor
NXP Employee
NXP Employee

Hi, @avinashstarkenn,

 

Each example provided with our toolbox has a readme next to them that contains information about its functionality, the hardware and software settings that need to be done. You will find information about the expected results of the application.

 

The Simulink model C code generated from the application can be viewed in the Embedded Coder menu, after pressing the View Code selection. Here you can find the C code generated by a specific block. 

georgevictor_1-1692714137164.png

 

 

This code is cross-compiled and linked into an executable file for the microcontroller. Hence, the address of the result buffer is a microcontroller address. You can use the FreeMASTER tool as in the s32k3xx_adc_single_read_s32ct example to read the values from the result buffer in real-time. Another method to see the values from the result buffer is to import the application in S32 Design Studio IDE and launch a debug session.

Hope this helps,

Victor

0 件の賞賛
返信