LPC4350 Simultaneous LPC_TIMER0 reads from M4 and M0

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

LPC4350 Simultaneous LPC_TIMER0 reads from M4 and M0

ソリューションへジャンプ
1,399件の閲覧回数
gregdunn
Contributor I

Is there any problem with initializing LPC_TIMER0 on the M4 core and then calling Chip_TIMER_ReadCount(LPC_TIMER0) asynchronously on both the M4 and M0 cores to allow for synchronized timing functions between both cores?  

Thanks,

Greg Dunn

ラベル(1)
0 件の賞賛
返信
1 解決策
1,301件の閲覧回数
bernhardfink
NXP Employee
NXP Employee

There shouldn't be a problem. Both cores are bust masters and can read at any point in time from peripheral resources. The one which reads first will get first.

What is always dangerous:

while (x < 1000)

{

   x = read_timer(timer0);

}

If you poll with full CPU speed on a register, even simultaneously with two different cores, then you might see weird system behavior.

Regards,

Bernhard.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,302件の閲覧回数
bernhardfink
NXP Employee
NXP Employee

There shouldn't be a problem. Both cores are bust masters and can read at any point in time from peripheral resources. The one which reads first will get first.

What is always dangerous:

while (x < 1000)

{

   x = read_timer(timer0);

}

If you poll with full CPU speed on a register, even simultaneously with two different cores, then you might see weird system behavior.

Regards,

Bernhard.

0 件の賞賛
返信
1,301件の閲覧回数
gregdunn
Contributor I

Thank you very much for the clarification!

Greg

0 件の賞賛
返信