Processor Expert FreeScaleCAN - Any ISR problems?

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

Processor Expert FreeScaleCAN - Any ISR problems?

ソリューションへジャンプ
1,568件の閲覧回数
AndersJ
Contributor IV

CW 4,7 PE 2.99 and FreeScaleCAN bean, for HCS12XEP100.

 

I have problems with the bean and the SendFrame procedure.

 

If SendFrame is called while interrupts are disabled,

and immediately reenabled then it seems something goes wrong,

as interrupts remain disabled.

 

Example:

EnterCriticalSection(); // Borrowed literally from PE

SendFrame(....);

ExitCriticalSection(); // Borrowed literally from PE

 

Without the CriticlSection code all works.

 

Perhaps my explanation is vague or not correct,

but this is more or less how I interpret the situation.

 

Background: The Tx procedure must be called from ISR and non ISR code.

To prevent reentrancy problems I need to disable interrupts while the it runs and then

restore the interrupt mask to whatever it was before it was disabled on entry.

This is where it all crashes, and I have isolated the problem to SendFrame.

 

Are there any related interrupt issues with SendFrame?

Alla ideas welcome.

 

Thanks,

Anders J

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
955件の閲覧回数
AndersJ
Contributor IV

Resolved.

PE Critical section macros cannot be nested.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
956件の閲覧回数
AndersJ
Contributor IV

Resolved.

PE Critical section macros cannot be nested.

0 件の賞賛
返信