Why isn't UART TX interrupt being called from within another ISR?

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

Why isn't UART TX interrupt being called from within another ISR?

ソリューションへジャンプ
734件の閲覧回数
asfarley
Contributor IV

MCU: K22F

I have one interrupt (generated by a Processor Expert ExtInt component) configured as Low priority. Inside the low-priority interrupt I want to send some serial port data.

I have UART0 configured in interrupt-mode with TX interrupt priority High.

Each is working independently: I can send and receive bytes on UART0, and the ExtInt is triggering as expected. However, when I attempt to transmit some bytes inside the ExtInt ISR, I don't see the bytes actually being transmitted until after the ExtInt ISR has completed. Basically, it's working as if the UART0 TX interrupt is actually a *lower* priority than the ExtInt priority. 

How is this possible?

ラベル(1)
0 件の賞賛
返信
1 解決策
643件の閲覧回数
asfarley
Contributor IV

Well, I think I figured it out. Underneath all the Processor Expert stuff, ExtInt was using a PORTB ISR. The PORTB ISR was configured to Highest Priority. 

I blame this on unclear PE configuration; it seems a bit misleading that I have to go digging through PORTB interrupt priorities because they're mysteriously affecting things in the background. It doesn't make any sense to allow PE to configure a lower-priority interrupt for ExtInt if it's already running inside a high-priority PORTB ISR. 

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
644件の閲覧回数
asfarley
Contributor IV

Well, I think I figured it out. Underneath all the Processor Expert stuff, ExtInt was using a PORTB ISR. The PORTB ISR was configured to Highest Priority. 

I blame this on unclear PE configuration; it seems a bit misleading that I have to go digging through PORTB interrupt priorities because they're mysteriously affecting things in the background. It doesn't make any sense to allow PE to configure a lower-priority interrupt for ExtInt if it's already running inside a high-priority PORTB ISR. 

0 件の賞賛
返信