Vybrid MQX ADC0 and ADC1

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

Vybrid MQX ADC0 and ADC1

ソリューションへジャンプ
1,263件の閲覧回数
speterson
Contributor III

Hi,

I am currently working with the Vybrid lwadc MQX example and am unable to get both ADC0 and ADC1 working.

The issue is that if BSPCFG_ENABLE_LWADC0 and BSPCFG_ENABLE_LWADC1 are defined non-zero in the BSP (user_config.h) that the interface enabled first will be overwritten by the second. Therefore if you have the following:

#define BSPCFG_ENABLE_LWADC0    1

#define BSPCFG_ENABLE_LWADC1    1

You will only be able to access the channels on ADC1 (ADC1SE0 through ADC1SE9) because the ADC1 initialization overwrites ADC0.

This appears to be a limitation of the driver, has anyone else seen this issue or working on a solution?

ラベル(2)
0 件の賞賛
1 解決策
685件の閲覧回数
rendy
NXP Employee
NXP Employee

I've consulted this issue with MQX team and it looks like the issue will be gone in next MQX release. It's version 4.1.0 and it will be available soon.

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
685件の閲覧回数
rendy
NXP Employee
NXP Employee

Hi Serah,

I can confirm this problem. I have contacted MQX team and waiting for their opinion. In the meantime I am trying to develop a workaround. If you have already developed your own, pls let me know.

Rene

0 件の賞賛
685件の閲覧回数
rendy
NXP Employee
NXP Employee

I found the workaround, there is a problem with 'context_ptr' variable in the 'lwadc_vadc.c' file. I suppose you have the 4.0.1 version of MQX. Please ty to add correct initialization of this variable in all functions in this file, except the '_lwadc_init' function. The initialization expression is:

context_ptr = lwadc_ptr->context_ptr;


I expect this should be corrected in MQX versions higher than 4.0.1, but at this moment I can't confirm that with certainity. I've attached the updated file. It would be great if you could try the solution and provide the feedback here.

686件の閲覧回数
rendy
NXP Employee
NXP Employee

I've consulted this issue with MQX team and it looks like the issue will be gone in next MQX release. It's version 4.1.0 and it will be available soon.

0 件の賞賛
685件の閲覧回数
karina_valencia
NXP Apps Support
NXP Apps Support

juangutierrez can you  help on this case?

0 件の賞賛