MPC5777C EQADC configuration using processor expert

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

MPC5777C EQADC configuration using processor expert

ソリューションへジャンプ
2,006件の閲覧回数
LyncLin
Contributor III

I'm using S32 SDK to configure for the MPC5777C chip.

Before I have setup a FreeRTOS with 2 ms and 10 ms tasks, as well as an EMIOS_PWM output channel, to toggle three external LEDs, it works fine.

Now I try to add an EQADC input channel, then I use the same PE configuration as in the Example project adc_pal_eqadc_mpc5777c, but change the channel to ANB23 related to our hardware,  and add the initialize function into main.c as below. However, the software seems to halt during ADC_Init() function. I try to debug step by step, but can't figure it out.


status = ADC_Init(&adc_pal1_instance, &adc_pal1_InitConfig0);
DEV_ASSERT(status == STATUS_SUCCESS);

 

I need help to solve this issue. Enclosed the project files I'm using. Thanks for your reply in advance.

 

Regards,

Lync

0 件の賞賛
返信
1 解決策
1,900件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems you make it finally running by increasing heap of init task, as you mentioned in https://community.nxp.com/t5/MPC5xxx/Is-there-an-example-project-to-configure-ADC-PAL-with-freertos/...

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,985件の閲覧回数
LyncLin
Contributor III

It seems inside the ADC_Init(), OSIF_TimeDelay() will be called. However, I put ADC_Init() before vTaskStartScheduler(), so there is no tick for OSIF_TimeDelay to count, which will block the software. Then I try to put ADC_Init() in 2 ms Task, however, it still doesn't work, it will stop where ADC_Init() is called. It looks like some functions inside OSIF component that ADC_Init() is using by default has a confilict with freeRTOS that added after. 

I hope someone can help on this.

0 件の賞賛
返信
1,965件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

try to add ADC init into 10ms task, which has higher priority. Does it pass ADC init in that case?

BR, Petr 

0 件の賞賛
返信
1,937件の閲覧回数
LyncLin
Contributor III

No, it didn't work. I tried to creat only one task for ADC init, but not work as well.

0 件の賞賛
返信
1,901件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems you make it finally running by increasing heap of init task, as you mentioned in https://community.nxp.com/t5/MPC5xxx/Is-there-an-example-project-to-configure-ADC-PAL-with-freertos/...

BR, Petr

0 件の賞賛
返信