Switch debug console non-blocking to blocking in hardfault

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Switch debug console non-blocking to blocking in hardfault

1,676 次查看
LarryZ
Contributor I

I am using the non-blocking configuration of the debug console (DEBUG_CONSOLE_TRANSFER_NON_BLOCKING) because I need to be able to poll for input without blocking.  However, I would like to output information from my hardfault handler.  Is there a way within the debug console to cause buffered output to be transferred out of the debug console UART while in a hardfault (which blocks interrupts)?  In previous projects, I have directly called the UART's ISR until the output buffer was empty, but it seems like there should be a way to do it within the fsl_debug_console library.

0 项奖励
回复
5 回复数

1,640 次查看
LarryZ
Contributor I

.

0 项奖励
回复

1,638 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

can you tell us the part number you are using?

BR

XiangJun Rong

 

0 项奖励
回复

1,633 次查看
LarryZ
Contributor I

It's a LPC55S69JBD64K.

And, just to be clear, the solution of calling the interrupt handler has the desired effect, it just feels like a bit of a kludge so I would prefer to use a method built into the fsl debug console library.

0 项奖励
回复

1,656 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suppose that the hardfault event is not an interrupt event, it is an exception event, I suppose that you can not output char in the ISR of hardfalut via uart.

Hope it can help you

BR

XiangJun Rong

0 项奖励
回复

1,632 次查看
LarryZ
Contributor I
Right - it's an exception, which means interrupts are not allowed. I know I can call FLEXCOMM7_DriverIRQHandler() every mS or so (I am using Flex Comm 7 for the console port), but I was hoping there might be an official way to do it within the FSL library.
0 项奖励
回复