ADC problem with MKE02Z64VLD4

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

ADC problem with MKE02Z64VLD4

ソリューションへジャンプ
717件の閲覧回数
juanma_clautron
Contributor II

Hi

 

I'm having a problem with KDS and Processor Expert.

 

- KDS 2.0.0

- CPU > MKE02Z64VLD4

- Component > ADC

 

When I click on "Generate Processor Expert Code" it generates ADC.c and ADC.h files. Then I click on "Build Project" and it shows the next error on ADC_Init method:

 

expected ';' before '}' token

 

If I check the file ADC.c I find the error: in last line, it misses " ; ".

 

void ADC_Init(void)

{

  OutFlg = 0U;                         /* No measured value */

  SumChan = 0U;                        /* Set the counter of measured channels to 0 */

  ModeFlg = STOP;                      /* Device isn't running */

  AdcLdd1_DeviceDataPtr = AdcLdd1_Init(NULL); /* Calling init method of the inherited component */

  ADC_PDD_SetFIFO_ScanMode(ADC_BASE_PTR, ADC_PDD_SCAN) /* Only channel methods are selected. To initiate FIFO only one channel in this mode is needed. */

}


I'll try to find how to modify basic components, but it's not possible. Erich Styger (http://mcuoneclipse.com/) told me that it's not possible to modify built-in components. The only solution is: Generate, then disable Generate and modify manually.

 

Is it possible to change the component?

 

Thanks

ラベル(1)
タグ(4)
0 件の賞賛
1 解決策
426件の閲覧回数
juanma_clautron
Contributor II

SOLVED! Well semi-solved!

1 - I add the component to the project

2 - Generate code

3 - Everything works correctly (only 3 lines)

void AD1_Init(void)

{

OutFlg = FALSE; /* No measured value */

ModeFlg = STOP; /* Device isn’t running */

AdcLdd1_DeviceDataPtr = AdcLdd1_Init(NULL); /* Calling init method of the inherited component */

}

4 - I disabled all methods and only enable “MeasureChan” and “GetChanValue”.

5 - Generate and … the line appears with an error!! It says the only channel methods are selected, this is why the line appears.

void ADC_Init(void)

{

OutFlg = 0U; /* No measured value */

SumChan = 0U; /* Set the counter of measured channels to 0 */

ModeFlg = STOP; /* Device isn’t running */

AdcLdd1_DeviceDataPtr = AdcLdd1_Init(NULL); /* Calling init method of the inherited component */

ADC_PDD_SetFIFO_ScanMode(ADC_BASE_PTR, ADC_PDD_SCAN) /* Only channel methods are selected. To initiate FIFO only one channel in this mode is needed. */

}

6 - The problem is solved if I enable one no-only channel method, but the problem remains unsolved.

元の投稿で解決策を見る

0 件の賞賛
1 返信
427件の閲覧回数
juanma_clautron
Contributor II

SOLVED! Well semi-solved!

1 - I add the component to the project

2 - Generate code

3 - Everything works correctly (only 3 lines)

void AD1_Init(void)

{

OutFlg = FALSE; /* No measured value */

ModeFlg = STOP; /* Device isn’t running */

AdcLdd1_DeviceDataPtr = AdcLdd1_Init(NULL); /* Calling init method of the inherited component */

}

4 - I disabled all methods and only enable “MeasureChan” and “GetChanValue”.

5 - Generate and … the line appears with an error!! It says the only channel methods are selected, this is why the line appears.

void ADC_Init(void)

{

OutFlg = 0U; /* No measured value */

SumChan = 0U; /* Set the counter of measured channels to 0 */

ModeFlg = STOP; /* Device isn’t running */

AdcLdd1_DeviceDataPtr = AdcLdd1_Init(NULL); /* Calling init method of the inherited component */

ADC_PDD_SetFIFO_ScanMode(ADC_BASE_PTR, ADC_PDD_SCAN) /* Only channel methods are selected. To initiate FIFO only one channel in this mode is needed. */

}

6 - The problem is solved if I enable one no-only channel method, but the problem remains unsolved.

0 件の賞賛